forked from mtusi2026/mtusi2026lab3
test(load): add load test with api replica stop
This commit is contained in:
@@ -70,10 +70,9 @@ func TestLoad(t *testing.T) {
|
||||
latency := time.Since(requestStart)
|
||||
|
||||
if err != nil {
|
||||
if atomic.CompareAndSwapInt64(&requestErrors, 0, 1) {
|
||||
if atomic.AddInt64(&requestErrors, 1) == 1 {
|
||||
t.Logf("first transport error: %v", err)
|
||||
}
|
||||
atomic.AddInt64(&requestErrors, 1)
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user