Stress test added
This commit is contained in:
parent
566548847f
commit
b6f50e3aba
1 changed files with 7 additions and 0 deletions
|
@ -52,3 +52,10 @@ func TestOncePanic(t *testing.T) {
|
|||
t.Fatalf("Once.Do called twice")
|
||||
})
|
||||
}
|
||||
|
||||
func TestOnceManyTimes(t *testing.T) {
|
||||
const N = 1000
|
||||
for i := 0; i < N; i++ {
|
||||
TestOnce(t)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue