From 25c79625d515cec7f44d8119b528dc71c62dd7cf Mon Sep 17 00:00:00 2001 From: Johan Walles Date: Wed, 17 Jul 2024 08:01:18 +0200 Subject: [PATCH] Fill out the test a bit --- twin/screen_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/twin/screen_test.go b/twin/screen_test.go index 741cac6..48e65e8 100644 --- a/twin/screen_test.go +++ b/twin/screen_test.go @@ -277,6 +277,13 @@ func TestInterruptableReader_blockedOnRead(t *testing.T) { // Give the reader thread some time to start waiting time.Sleep(100 * time.Millisecond) + // Ensure the reader is not done, it should be blocked on the read() + select { + case <-readResultChan: + t.Fatal("Reader should not be done yet") + default: + } + // Interrupt the reader testMe.Interrupt()