mirror of
https://github.com/fatedier/frp.git
synced 2026-04-30 21:19:10 +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()
|
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")
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user