Repository navigation
test: Pass the event flush interval to the SDK in seconds in the contract test service - #560
Merged
Merged
Conversation
…ract test service Generated-by: termag
There was a problem hiding this comment.
Risk: low.
Automated risk review (dry run): Low
This PR would be automatically approved.
Why: One-line conversion of flushIntervalMs to seconds in ContractTests/Source/Controllers/SdkController.swift, matching startWaitTimeMs; contract-test service only, not SDK runtime.
If you disagree with this review, share this PR in #feedback-agent-approvals or submit a changes-requested review explaining why.
Sent by Cursor Approval Agent: Dry-Run PR Approver
joker23
approved these changes
Nov 19, 2026
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.


The contract test service set
LDConfig.eventFlushIntervalto the harness'sflushIntervalMsvalue without converting it.eventFlushIntervalis aTimeIntervalin seconds, so a 1000 ms interval became 1000 seconds and the SDK never flushed on its own during a test. The service now divides by 1000, the same way it convertsstartWaitTimeMs. This is a test-service change only. The harness's automatic flush tests (sdk-test-harness#669) configure a 1 s interval and fail without it. Other tests are unaffected: the harness default of 1,000,000 ms and the 60 s delivery cooldown interval both stay far longer than any test.Testing: not built here, because this box has no Xcode; CI builds the service and runs the current v2 contract tests.
Opened from termag
Note
Overview
The contract test service was assigning the harness’s
flushIntervalMsdirectly toLDConfig.eventFlushInterval, which is aTimeIntervalin seconds. A 1 s harness setting became 1000 s, so automatic flush behavior in tests never matched intent.SdkControllernow setseventFlushInterval = flushIntervalMs / 1_000, matching howstartWaitTimeMsis converted for client startup. This is a test-service-only mapping fix; it unblocks harness automatic flush scenarios that rely on short intervals.Reviewed by Cursor Bugbot for commit 7219798. Bugbot is set up for automated code reviews on this repo. Configure here.