-
Notifications
You must be signed in to change notification settings - Fork 1
Clocks Refactor and More Testing Of Calendar Monitoring Code #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
belongs there because enable_manual_calendar_rescan = false
so that way we can use import and all the other stuff without having to be an esm module. and we can use dynamic imports for people who just must be esm looking at you execa (youre awesome though)
|
Build artifacts for this PR are available: You can download these artifacts from the "Artifacts" section of the workflow run. |
|
Build artifacts for this PR are available: You can download these artifacts from the "Artifacts" section of the workflow run. |
|
Build artifacts for this PR are available: You can download these artifacts from the "Artifacts" section of the workflow run. |
|
Build artifacts for this PR are available: You can download these artifacts from the "Artifacts" section of the workflow run. |
|
Build artifacts for this PR are available: You can download these artifacts from the "Artifacts" section of the workflow run. |
c508358 to
37fbff0
Compare
|
Build artifacts for this PR are available: You can download these artifacts from the "Artifacts" section of the workflow run. |
crazy super close now
EVERYTHING. OMG THIS SHIT WAS SOOOOOOOOOOOOOOOOOOOOOOOOOO HARRRRRRRRRRDDDDDDDD!!!!!! WTF!!!!
|
Build artifacts for this PR are available: You can download these artifacts from the "Artifacts" section of the workflow run. |
android/app/src/main/java/com/github/quarck/calnotify/ui/MainActivity.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/ui/TestActivity.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/ui/TestActivity.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/ui/TestActivity.kt
Outdated
Show resolved
Hide resolved
android/app/src/test/java/com/github/quarck/calnotify/utils/CNPlusTestClock.kt
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/utils/CNPlusSystemClock.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/ui/TestActivity.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/quiethours/QuietHoursManager.kt
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/calendarmonitor/CalendarMonitorService.kt
Show resolved
Hide resolved
we can make it more robust in another pr more focused on it
|
Build artifacts for this PR are available: You can download these artifacts from the "Artifacts" section of the workflow run. |
Refactoring the code to use clocks made it much easier to test time watching related code so we do a lot of it now check out all the tests in android/app/src/androidTest/java/com/github/quarck/calnotify/calendarmonitor i.e. android/app/src/androidTest/java/com/github/quarck/calnotify/calendarmonitor/CalendarMonitorServiceTest.kt and docs/clock_implementation.md * test: move testCalendarMonitoringDisabled to event reminder flow tests belongs there because enable_manual_calendar_rescan = false * test: update clean logs script to be typescipt! so that way we can use import and all the other stuff without having to be an esm module. and we can use dynamic imports for people who just must be esm looking at you execa (youre awesome though) * test: testCalendarMonitoringDisabled works! * test: more an older test more robust * test: bit more lenient * test: update and first unit * test: testFirstScanEver * test: run units in actions * test: units need node stuff * ci: consistent use of yarn cache * ci: refactor actions to stop duplicating so much work * ci: remove update for unit tests * fix: bring in missing stuff from master * ci: fix invalid references * ci: maybe fix unit test runner * ci: split native builds for arch * ci: report for unit * test: sleeps in tests almost all gone * test: unit test deps * test: hopefully fix coverage upload * ci: fix move kvm setup to common action * ci: turns out we were never updating the cache at all :/ * ci: move cache updates to post step * ci: cache update seperately * refactor: init commit of clock * test: things run with new clocks obvi stuff is failing but some is passing! * ci: hopefully finally actually cache native stuff build * test: closer on firstscanever * refactor: app controller clocks * refactor: alarm clocks * docs: update clocks docs * refactor: several places got clocks CalendarReloadManager CalendarMonitor EventNotificationManager QuietHoursManager * refactor: calendar clock * refactor: more class ... clocking in :D im sorry :D * test: clocking in * refactor: activities clocking in * test: now we can test time related stuff legitly * fix: compiles * test: unmangle calendar monitor test * fix: rollback activity changes that broke build can fix those last * test: passing after clocks refactor!!!!!!!!!!!!!!!!!! * test: checkpoint * test: firstScanEver its own test now * test: setting the clocks across the tests but seriously this makes it so we consolidate clock logic in test clock and make sure things are centralized also we were doing real simlated sleep for no reason and mocking in mulitiple places for no reason * test: first scan ever passes! * test: fix testCalendarMonitoringDirectReminder * test: even cleaner logs! * test: testCalendarReload is back passing! * test: latest delayed processing * test: collapse known exceptions * test: more log scrubing * test: we shall see monitor test stuff * test: maybe delay * test: close on new monitor tests * test: everything else passed! but testCalendarReload failed again? crazy super close now * test: AS PREDICTED! MOVING FIRST SCAN STUFF OUT GETS US PASSING !!! EVERYTHING. OMG THIS SHIT WAS SOOOOOOOOOOOOOOOOOOOOOOOOOO HARRRRRRRRRRDDDDDDDD!!!!!! WTF!!!! * test: refactoring doc * docs: clocks * test: disguise between test clocks * revert: just make clock do what it always has for now we can make it more robust in another pr more focused on it * revert: make main activity like master but just with clocks * refactor: bring back missing clock updates * revert: make test activity like master but with clocks * revert: arrays to master * fix: missing imports
Refactoring the code to use clocks made it much easier to test time watching related code so we do a lot of it now
check out all the tests in
android/app/src/androidTest/java/com/github/quarck/calnotify/calendarmonitor
i.e.
android/app/src/androidTest/java/com/github/quarck/calnotify/calendarmonitor/CalendarMonitorServiceTest.kt
and
docs/clock_implementation.md