diff --git a/spouttest/asserts.go b/spouttest/asserts.go index ea82e93..91667a9 100644 --- a/spouttest/asserts.go +++ b/spouttest/asserts.go @@ -24,26 +24,6 @@ func AssertRecv(t *testing.T, ch <-chan string, label, expected string) { } } -// AssertRecvMulti checks that a specific string has been received -// from a channel. The channel will be read multiple times if -// required. The check times out after LongWait. -func AssertRecvMulti(t *testing.T, ch <-chan string, label, expected string) { - expected = stripLeadingNL(expected) - - var received string - timeout := time.After(LongWait) - for { - select { - case received = <-ch: - if expected == received { - return - } - case <-timeout: - t.Fatalf("timed out waiting for %s. last received: %q", label, received) - } - } -} - func stripLeadingNL(s string) string { // This allows long `expected` strings to be formatted nicely in // the caller.