|
@@ -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 {
|
|
|
|
|
- t.Errorf("expected %v, got %v", context.DeadlineExceeded, err)
|
|
|
|
|
|
|
+ if err != nil && !strings.Contains(err.Error(), context.DeadlineExceeded.Error()) {
|
|
|
|
|
+ t.Errorf("expected %v from gRPC, got %v", context.DeadlineExceeded, err)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|