pubsub: fix end-to-end test
We were skipping the check at the end, so the test
was always succeeding.
In conjunction with the fix for MaxEntension, this test
now succeeds (correctly) and doesn't seem to be flaky. (It
also takes longer.)
@@ -266,6 +266,7 @@ func TestEndToEnd(t *testing.T) {
defer checkQuiescence.Stop()
var received bool
+loop:
for {
select {
case <-recv:
@@ -275,7 +276,7 @@ func TestEndToEnd(t *testing.T) {
received = false
} else {
cancel()
- return
+ break loop
}
case <-timeoutC:
t.Errorf("timed out")
