CI: two unit-test races failed hosted v2-ci runs 1218–1220 (MeshPsk refresh, credential-lockout burst) #871
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hosted
v2-ciunit-tests failed on master for runs 1218, 1219 and 1220 (d1b6cad2,03e51457,e857135e). Each failure was a test race, not a product defect:MeshPskProviderRefreshTests.A_rotated_key_is_swapped_in_atomically_with_the_old_key_served_until_then(runs 1218, 1219):resolver.Callsexpected 1, was 2.GatedResolver.Enteredwas set by the priming refresh and never reset, soWait()returned before the held refresh reached the store and the call-count snapshot raced its increment.FailedCredentialLockoutTests.An_all_bad_parallel_burst_authenticates_only_max_attempts_and_refuses_the_waiters_as_locked_out(runs 1218, 1220):authenticatedexpected 5, was 0. The 15 waiters could queue before a slot holder ran the increment afterBeginAsync.ConditionRefreshDeferralWireTests.Concurrent_reports_…(enforced: True)(run 1219): the stress precondition failed (deferredSeenwas 1). Already fixed by284358a2(presence wait with a 90 s ceiling), which landed after that run.Fix:
Hold()resetsEntered; the lockout test waits for both the queued count and the slot holders' increments. Security assertions unchanged. Both tests looped 20 times locally with 0 failures.Fixed, pushed to master in
363f0d81(9aaab9ee). Both tests looped 20 times locally with 0 failures.Also fixed (
11ea972c):SqlTestDatabaseReaperTests.Reap_leaves_an_aged_name_whose_suffix_is_not_a_guid_alonefailed once in the local pre-push suite and passed 3 of 3 on re-run. It used a fixed database name on the SQL Server that every checkout and CI share, so the name is now unique per run. That cause is plausible but not proven.Confirmed on the hosted runner: v2-ci run 1222 (
363f0d81, which includes these fixes) is green. Runs 1218–1221 had failed on these races.