From 6cc64094e89b16699b4a7c7ed87856791c490d8c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:18:37 +0000 Subject: [PATCH 1/5] test: fix flaky event_reported_while_polling test The onSyncComplete closure in the waitUntil block called done() for any sync result, including poll-triggered completions from the still- active polling timer. When the timer fired during the waitUntil window, done() was called twice: once from the poll result and once from the stream event. Filter the onSyncComplete callback to only call done() when the expected .streamEventWhilePolling error arrives, ignoring poll results. Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com> --- .../ServiceObjects/FlagSynchronizerSpec.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/LaunchDarkly/LaunchDarklyTests/ServiceObjects/FlagSynchronizerSpec.swift b/LaunchDarkly/LaunchDarklyTests/ServiceObjects/FlagSynchronizerSpec.swift index 6625ed7c..1421827d 100644 --- a/LaunchDarkly/LaunchDarklyTests/ServiceObjects/FlagSynchronizerSpec.swift +++ b/LaunchDarkly/LaunchDarklyTests/ServiceObjects/FlagSynchronizerSpec.swift @@ -840,10 +840,11 @@ final class FlagSynchronizerSpec: QuickSpec { waitUntil { done in testContext.flagSynchronizer.onSyncComplete = { result in - if case .error(let errorResult) = result { + if case .error(let errorResult) = result, + case .streamEventWhilePolling = errorResult { syncError = errorResult + done() } - done() } testContext.flagSynchronizer.testStreamOnMessage(event: "put", messageEvent: MessageEvent(data: data)) From 01b64770b0df8dc82de44c794693935f4421d4cf Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:25:16 +0000 Subject: [PATCH 2/5] ci: trigger CI run 2 Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com> From e729381b345e2e32af209535febacaf84edfe864 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:31:48 +0000 Subject: [PATCH 3/5] ci: trigger CI run 3 Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com> From b69d71b28a40eb4b312ce772e89c5a6c5221aaaa Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:38:17 +0000 Subject: [PATCH 4/5] ci: trigger CI run 4 Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com> From f87c80f96a880fda41c99f5f1b9849fed4a7b173 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 16:46:32 +0000 Subject: [PATCH 5/5] ci: trigger CI run 5 Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>