Skip to content

test: Pass the event flush interval to the SDK in seconds in the contract test service - #560

Merged
kinyoklion merged 1 commit into
v11from
rlamb/contract-test-flush-interval
Nov 19, 2026
Merged

kinyoklion merged 1 commit into
v11from
rlamb/contract-test-flush-interval

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

The contract test service set LDConfig.eventFlushInterval to the harness's flushIntervalMs value without converting it. eventFlushInterval is a TimeInterval in 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 converts startWaitTimeMs. 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 flushIntervalMs directly to LDConfig.eventFlushInterval, which is a TimeInterval in seconds. A 1 s harness setting became 1000 s, so automatic flush behavior in tests never matched intent.

SdkController now sets eventFlushInterval = flushIntervalMs / 1_000, matching how startWaitTimeMs is 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.

@kinyoklion
kinyoklion marked this pull request as ready for review November 19, 2026 20:54
@kinyoklion
kinyoklion requested a review from a team as a code owner November 19, 2026 20:54
@cursor cursor Bot added the risk:low label Nov 19, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Open in Web View Automation 

Sent by Cursor Approval Agent: Dry-Run PR Approver

@kinyoklion
kinyoklion merged commit 4f39ca0 into v11 Nov 19, 2026
21 checks passed
@kinyoklion
kinyoklion deleted the rlamb/contract-test-flush-interval branch November 19, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants