From c24f003b556bb5195540337ee9ceb8fef5a0f776 Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Sun, 16 Jan 2022 12:39:37 -0800 Subject: [PATCH] protoio: fix incorrect test assertion (#7606) After writing and then reading a bunch of random messages, the test was checking that it did not read the same number of messages that it wrote. The sense of this check was inverted; they should match. Introduced by accident in #7522. I'm not sure why this did not show up in CI. Edit: I now know why it didn't show up in ci: #7608. --- internal/libs/protoio/io_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/libs/protoio/io_test.go b/internal/libs/protoio/io_test.go index 1b81874af..4420ad786 100644 --- a/internal/libs/protoio/io_test.go +++ b/internal/libs/protoio/io_test.go @@ -95,7 +95,7 @@ func iotest(t *testing.T, writer protoio.WriteCloser, reader protoio.ReadCloser) } i++ } - require.NotEqual(t, size, i) + require.Equal(t, size, i, "messages read ≠ messages written") if err := reader.Close(); err != nil { return err }