Repository navigation
test(events): match the Apple processor tests at DISABLED and DEFERRED - #429
Open
abelonogov-ld wants to merge 7 commits into
Open
abelonogov-ld wants to merge 7 commits into
abelonogov-ld wants to merge 7 commits into
Conversation
The direct-construction helper always built a persisting store committing off the caller's thread, so the scheduler, close and diagnostic tests ran at deferred persistence in both classes and never without a disk. It now follows persistence(): immediate in DirectEventProcessorTest, disabled in its WithoutPersistence subclass. Co-authored-by: Cursor <cursoragent@cursor.com>
…d not Ports the Apple examples with no counterpart here: a delivery never closing a batch partway through another commit's run (deferred), going offline and back online delivering nothing on its own, the periodic flush posting nothing with nothing to send and only what is new each time, the batch size recorded for the diagnostic event, and a flush bypassing the backoff posting nothing while offline. Co-authored-by: Cursor <cursoragent@cursor.com>
…vent-persistence-mode-test-parity
…vent-persistence-mode-test-parity
There was a problem hiding this comment.
Risk: Low.
Automated risk review (dry run): Low
This PR would be automatically approved.
Why: The change is test-only in DirectEventProcessorTest.java: the shared processor factory now follows persistence(), and new tests cover DISABLED/DEFERRED behavior already covered on Apple. Cursor Bugbot passed with no findings.
Sent by Cursor Approval Agent: Dry-Run PR Approver
…vent-persistence-mode-test-parity
…vent-persistence-mode-test-parity
…vent-persistence-mode-test-parity
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Test-only; no behavior change and no version bump. Stacked on #426.
Harness. The shared default processor was always built persisting at IMMEDIATE, so
DirectEventProcessorWithoutPersistenceTestreran most shared tests with a disk. It now followspersistence().Ported from the iOS spec (examples with no counterpart here):
The matching iOS tests are on the iOS tier 3 branch. The launch gate at DISABLED is covered on #421.
Note
Overview
Test-only alignment with the Apple event processor suite: shared
DirectEventProcessorTestharness now builds processors viapersistence()so non-persisting subclasses (e.g.DirectEventProcessorWithoutPersistenceTest) no longer inherit an always-on disk store.New coverage mirrors iOS tier-3 expectations: redundant offline/online toggles do not trigger extra sends; periodic flush is idle when empty and ships only events since the last tick; batch close does not interleave with an in-flight commit; diagnostics report
eventsInLastBatch(including zero on empty flush); andflushBypassingBackoff()sends nothing while offline.Reviewed by Cursor Bugbot for commit dea600f. Bugbot is set up for automated code reviews on this repo. Configure here.