noise: repeat concurrent SSH verdict waiters test

Nothing signals that both waiters parked before FinishAuth, so one
pass mostly checks them one after the other.
This commit is contained in:
Kristoffer Dalby authored and Kristoffer Dalby committed 2026-10-07 12:50:32 +02:00
1 parent c9992efaca
commit 97c4bf264e
1 file changed
+9 -2
+9 -2
View File
@@ -953,14 +953,20 @@ func TestSSHActionFollowUp_ConsumedVerdictNotReplayed(t *testing.T) {
// TestSSHActionFollowUp_ConcurrentWaiters parks two follow-ups on one // TestSSHActionFollowUp_ConcurrentWaiters parks two follow-ups on one
// session: exactly one may consume the verdict, the other re-decides. // session: exactly one may consume the verdict, the other re-decides.
// FinishAuth can land before either waiter parks and nothing signals the
// park, so the body repeats to exercise the both-parked order.
func TestSSHActionFollowUp_ConcurrentWaiters(t *testing.T) { func TestSSHActionFollowUp_ConcurrentWaiters(t *testing.T) {
t.Parallel() t.Parallel()
const iterations = 200
for _, tc := range sshVerdictCases { for _, tc := range sshVerdictCases {
t.Run(tc.name, func(t *testing.T) { t.Run(tc.name, func(t *testing.T) {
t.Parallel() t.Parallel()
f := newSSHVerdictFixture(t) f := newSSHVerdictFixture(t)
for range iterations {
authID, auth := f.mint(t) authID, auth := f.mint(t)
var ( var (
@@ -992,8 +998,9 @@ func TestSSHActionFollowUp_ConcurrentWaiters(t *testing.T) {
held++ held++
} }
assert.Equal(t, 1, carried, "exactly one waiter must carry the verdict") require.Equal(t, 1, carried, "exactly one waiter must carry the verdict")
assert.Equal(t, 1, held, "the other waiter must re-delegate") require.Equal(t, 1, held, "the other waiter must re-delegate")
}
}) })
} }
} }