Repository navigation
fix: deflake Weixin standby takeover test under parallel -T1C builds - #3629
Merged
Merged
Conversation
Widen the takeover observation in WeixinLeaseLifecycleTest from 3s to 10s. The awaited chain is convergent by construction — the consumer loop retries while it runs and every step is bounded (one standby retry sleep of leaseMs/3, three localhost HTTP round trips, one boundedElastic hop) — so only the wall-clock window can fail. Under -T1C contention those steps stall for whole seconds at a time; the 172156 CI run missed the 3s window with the loop healthy (no retry warnings). 10s keeps headroom under the class @timeout(20) fuse and adds zero time to the happy path, which exits on the latch.
jujn
approved these changes
Oct 17, 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.
Deflakes the ubuntu failure from CI batch 172156 (run on current main, PR #3442).
WeixinLeaseLifecycleTest.standbyKeepsTryingAndTakesOverWithoutConfigurationChange (ubuntu)
sent.await(3s)returned false: after the lease was released, the standby did not finish takeover — acquire, notifyStart, getupdates, dispatch, sendmessage — within 3 seconds.leaseMs/3= 500ms), three localhost HTTP round trips, oneboundedElastichop. No interleaving loses the takeover; only the wall-clock observation window can fail.channel.start()even logged, and the takeover window expired with zero retry/warn lines from the consumer loop.leaseMswould make the lease likelier to expire mid-takeover during a stall — structurally worse.@Timeout(20)fuse even including the observed pre-start stall. Latch-based, so the happy path is unchanged — the same CI run's sibling test finished its whole flow in 2.1s.ChatSessionsTest.queuedTasksAreDistinctAndSteeringStaysInCurrentExecution (windows)
Already fixed on main; no change needed. The failing run (Oct 11) built on base
da3b867, which predates #3602 — where this exact await was widened from the 15s default to 60s ("Two durable turns with streamed output can exceed 15 seconds on Windows runners") — and #3616's snapshot consistency fix. The failure signature matches: the timeout snapshot held one completed turn while the queued turn had norun/startfact yet, i.e. turn two had not started within 15s under load.Testing
mvn -pl agentscope-extensions/agentscope-extensions-channel/agentscope-extensions-channel-weixin test— 71 pass / 1 skipped, same as CIWeixinLeaseLifecycleTest×8 under 8-process CPU load — all green, ~5.9s per class run under loadspotless:checkclean