From: Timo Sirainen Date: Mon, 8 Jan 2024 15:13:16 +0000 (-0500) Subject: lib: test-ostream-multiplex - Clarify the assert/comment X-Git-Tag: 2.4.0~1798 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbc9ddebd4bd685be90268fbd5764c2b6af1ea9d;p=thirdparty%2Fdovecot%2Fcore.git lib: test-ostream-multiplex - Clarify the assert/comment --- diff --git a/src/lib/test-ostream-multiplex.c b/src/lib/test-ostream-multiplex.c index d5b7ac1173..8bf0e9411b 100644 --- a/src/lib/test-ostream-multiplex.c +++ b/src/lib/test-ostream-multiplex.c @@ -246,11 +246,10 @@ static void test_ostream_multiplex_hang(void) test_assert(o_stream_finish(channel2) == 0); o_stream_uncork(channel); o_stream_uncork(channel2); - /* We expect the first channel to have data buffered */ - test_assert(o_stream_get_buffer_used_size(channel) >= + /* The previous writes must leave some data buffered into channel 0. + Otherwise the test isn't fully testing what it's supposed to be. */ + test_assert(o_stream_get_buffer_used_size(channel) > o_stream_get_buffer_used_size(file_output)); - test_assert(o_stream_get_buffer_used_size(channel) - - o_stream_get_buffer_used_size(file_output) > 0); /* read everything that was already sent */ struct istream *file_input = i_stream_create_fd(fd[0], 1024);