Fix: убрал баг с нулевым временем Sleep
This commit is contained in:
parent
94cac076e7
commit
8890479bd2
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ func TestStaleRead(t *testing.T) {
|
||||||
go func(i int) {
|
go func(i int) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
|
||||||
time.Sleep(time.Millisecond * time.Duration(i/N))
|
time.Sleep(time.Duration(i) * time.Millisecond / time.Duration(N))
|
||||||
for j := 0; j < K; j++ {
|
for j := 0; j < K; j++ {
|
||||||
counterValue := atomic.LoadInt32(&counter)
|
counterValue := atomic.LoadInt32(&counter)
|
||||||
batcherValue := b.Load().(int32)
|
batcherValue := b.Load().(int32)
|
||||||
|
|
Loading…
Reference in a new issue