mirror of
https://github.com/fatedier/frp.git
synced 2026-03-31 22:29:26 +08:00
server/group: replace tautological assertion with require.NotPanics
This commit is contained in:
@@ -95,7 +95,8 @@ func TestConcurrentGetOrCreateAndRemoveIf(t *testing.T) {
|
||||
}
|
||||
wg.Wait()
|
||||
|
||||
// After all goroutines finish, the key either exists or not — no panic or race.
|
||||
_, ok := r.get("k")
|
||||
require.True(t, ok || !ok) // just verifying no panic
|
||||
// After all goroutines finish, accessing the key must not panic.
|
||||
require.NotPanics(t, func() {
|
||||
_, _ = r.get("k")
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user