veyron/runtimes/google/ipc: Catch test error.
It seems that tests are occasionally failing in StartCall.
Catch that instead of having the test fail with a nil-dereference later
on.
Change-Id: Ic761ceba8663205e7f38022b47b12e29d729e6fe
diff --git a/runtimes/google/ipc/full_test.go b/runtimes/google/ipc/full_test.go
index 9e4f441..42f0a90 100644
--- a/runtimes/google/ipc/full_test.go
+++ b/runtimes/google/ipc/full_test.go
@@ -664,12 +664,14 @@
b.server.Publish("incompatible")
call, err := b.client.StartCall("incompatible/server/suffix", "Echo", []interface{}{"foo"})
- expected := `method:"Echo",suffix:"suffix",arg:"foo"`
- var result string
- err = call.Finish(&result)
if err != nil {
+ t.Fatal(err)
+ }
+ var result string
+ if err = call.Finish(&result); err != nil {
t.Errorf("Unexpected error finishing call %v", err)
}
+ expected := `method:"Echo",suffix:"suffix",arg:"foo"`
if result != expected {
t.Errorf("Wrong result returned. Got %s, wanted %s", result, expected)
}