Merge pull request #9787 from gyuho/fix
clientv3/integration: fix "TestMaintenanceSnapshotErrorInflight"release-3.4
commit
e2a6489c1e
|
@ -21,6 +21,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -188,7 +189,7 @@ func TestMaintenanceSnapshotErrorInflight(t *testing.T) {
|
||||||
// 300ms left and expect timeout while snapshot reading is in progress
|
// 300ms left and expect timeout while snapshot reading is in progress
|
||||||
time.Sleep(700 * time.Millisecond)
|
time.Sleep(700 * time.Millisecond)
|
||||||
_, err = io.Copy(ioutil.Discard, rc2)
|
_, err = io.Copy(ioutil.Discard, rc2)
|
||||||
if err != nil && err != context.DeadlineExceeded {
|
if err != nil && !strings.Contains(err.Error(), context.DeadlineExceeded.Error()) {
|
||||||
t.Errorf("expected %v, got %v", context.DeadlineExceeded, err)
|
t.Errorf("expected %v from gRPC, got %v", context.DeadlineExceeded, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue