From e4f2e04736d015522cdd4a9a28df8df2ecac9794 Mon Sep 17 00:00:00 2001 From: Stephen Searles Date: Fri, 4 Aug 2017 19:14:17 -0700 Subject: [PATCH] added an extra message check to the client test --- client_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client_test.go b/client_test.go index 23e72ba..55d9ab7 100644 --- a/client_test.go +++ b/client_test.go @@ -43,4 +43,13 @@ func TestClient(t *testing.T) { if got := doc.Contents(); got != "alphabet" { t.Errorf("saw doc %q, expected %q", got, "alphabet") } + + select { + case <-bobCh: + t.Error("got an unexpected message via Bob") + case <-aliceCh: + t.Error("got an unexpected message via Alice") + case <-time.After(100 * time.Millisecond): + // expected + } }