Merge "runtimes/google/ipc: another attempt to fix flaky tests"
diff --git a/runtimes/google/ipc/client_test.go b/runtimes/google/ipc/client_test.go
index f9aa034..e6e6b2e 100644
--- a/runtimes/google/ipc/client_test.go
+++ b/runtimes/google/ipc/client_test.go
@@ -464,14 +464,8 @@
testForVerror(t, verr, verror.Timeout, verror.BadProtocol, verror.NoExist)
return
}
- // The local namespace client may return the 'current' name when it encounters
- // a timeout or other networking error, which means we may end up invoking an
- // RPC on that entry - which in our case means we end up invoking:
- // <mount table endpoint>/noservers.Sleep(). This RPC will fail immediately
- // since we've already reached our timeout, but we can't see that error
- // until we call Finish.
err := call.Finish(&verr)
- testForVerror(t, err, verror.Timeout, verror.BadProtocol)
+ testForVerror(t, err, verror.Timeout, verror.BadProtocol, verror.NoExist)
}
func TestNoMountTable(t *testing.T) {
diff --git a/runtimes/google/ipc/server_test.go b/runtimes/google/ipc/server_test.go
index bc91133..98cacab 100644
--- a/runtimes/google/ipc/server_test.go
+++ b/runtimes/google/ipc/server_test.go
@@ -62,7 +62,11 @@
t.Errorf("Got (%q, %v) want (%q, nil)", result, err, expected)
}
// Kill the server, verify client can't talk to it anymore.
- server.Shutdown(nil, nil)
+ sh.SetWaitTimeout(time.Minute)
+ if err := server.Shutdown(os.Stderr, os.Stderr); err != nil {
+ t.Fatalf("unexpected error: %s", err)
+ }
+
if _, err := makeCall(); err == nil || (!strings.HasPrefix(err.Error(), "START") && !strings.Contains(err.Error(), "EOF")) {
t.Fatalf(`Got (%v) want ("START: <err>" or "EOF") as server is down`, err)
}