added an extra message check to the client test
This commit is contained in:
@@ -43,4 +43,13 @@ func TestClient(t *testing.T) {
|
|||||||
if got := doc.Contents(); got != "alphabet" {
|
if got := doc.Contents(); got != "alphabet" {
|
||||||
t.Errorf("saw doc %q, expected %q", 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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user