flow/manager: Make TestDialCachedConn actually test something.
Change-Id: I7bd33f33deb95d0ae50dbd980103930aa9878cd5
diff --git a/runtime/internal/flow/manager/manager_test.go b/runtime/internal/flow/manager/manager_test.go
index 1b92c1b..9752a56 100644
--- a/runtime/internal/flow/manager/manager_test.go
+++ b/runtime/internal/flow/manager/manager_test.go
@@ -64,11 +64,15 @@
if got, want := len(dm.(*manager).cache.addrCache), 1; got != want {
t.Fatalf("got cache size %v, want %v", got, want)
}
+ old := dm.(*manager).cache.ridCache[am.RoutingID()]
// After dialing another connection the cache should still hold one connection
// because the connections should be reused.
testFlows(t, ctx, dm, am, flowtest.BlessingsForPeer)
if got, want := len(dm.(*manager).cache.addrCache), 1; got != want {
- t.Fatalf("got cache size %v, want %v", got, want)
+ t.Errorf("got cache size %v, want %v", got, want)
+ }
+ if c := dm.(*manager).cache.ridCache[am.RoutingID()]; c != old {
+ t.Errorf("got %v want %v", c, old)
}
shutdown()