server/group: replace tautological assertion with require.NotPanics

This commit is contained in:
fatedier
2026-03-08 18:19:12 +08:00
parent 0125ca9437
commit 2de56556d9

View File

@@ -95,7 +95,8 @@ func TestConcurrentGetOrCreateAndRemoveIf(t *testing.T) {
} }
wg.Wait() wg.Wait()
// After all goroutines finish, the key either exists or not — no panic or race. // After all goroutines finish, accessing the key must not panic.
_, ok := r.get("k") require.NotPanics(t, func() {
require.True(t, ok || !ok) // just verifying no panic _, _ = r.get("k")
})
} }