Repository navigation
test(events): match the Apple processor tests at DISABLED and DEFERRED - #429
Open
abelonogov-ld wants to merge 2 commits into
Open
abelonogov-ld wants to merge 2 commits into
abelonogov-ld wants to merge 2 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>
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: no production or SDK behavior changes.
The shared
makeEventProcessorfactory now derives persistence frompersistence()(disk backing and immediate vs deferred) instead of always building an immediate, persisted store—soDirectEventProcessorWithoutPersistenceTestand other subclasses exercise the right mode.New coverage in
DirectEventProcessorTest: offline/online transitions do not send on their own; periodic flush is a no-op when empty and only ships events since the last flush; concurrent commit/delivery never closes a batch mid-commit (DEFERRED-style); diagnosticseventsInLastBatchmatches delivered batch size;flushBypassingBackoff()sends nothing while offline.Reviewed by Cursor Bugbot for commit 07e50b5. Bugbot is set up for automated code reviews on this repo. Configure here.