Skip to content

Conversation

@williscool
Copy link
Owner

@williscool williscool commented Apr 3, 2025

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

@github-actions
Copy link

github-actions bot commented Apr 3, 2025

Build artifacts for this PR are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

github-actions bot commented Apr 3, 2025

Build artifacts for this PR are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

github-actions bot commented Apr 3, 2025

Build artifacts for this PR are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

github-actions bot commented Apr 3, 2025

Build artifacts for this PR are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

github-actions bot commented Apr 3, 2025

Build artifacts for this PR are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@williscool williscool enabled auto-merge (squash) April 3, 2025 23:26
@github-actions
Copy link

github-actions bot commented Apr 3, 2025

Build artifacts for this PR are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

github-actions bot commented Apr 5, 2025

Build artifacts for this PR are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@williscool williscool disabled auto-merge April 5, 2025 01:00
@github-actions
Copy link

github-actions bot commented Apr 5, 2025

Build artifacts for this PR are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@williscool williscool changed the title feat/moar testing Clocks Refactor and More Testing Apr 5, 2025
@williscool williscool changed the title Clocks Refactor and More Testing Clocks Refactor and More Testing Of Calendar Monitoring Code Apr 5, 2025
@williscool williscool merged commit 947cf1f into master Apr 5, 2025
8 checks passed
williscool added a commit that referenced this pull request Apr 5, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants