From 59d5bd42fdc59196af927f2db26a580685164c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kohlschu=CC=88tter?= Date: Sun, 30 Jun 2024 21:37:52 +0200 Subject: [PATCH] test: common: Attempt to fix flaky test, take two --- .../java/org/newsclub/net/unix/ServerSocketCloseTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketCloseTest.java b/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketCloseTest.java index fc030b87d..8135e4e35 100644 --- a/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketCloseTest.java +++ b/junixsocket-common/src/test/java/org/newsclub/net/unix/ServerSocketCloseTest.java @@ -118,6 +118,10 @@ public void run() { active = threadPool.getActiveCount(); } + if (active > 0) { + checkFailedTestActuallySupported(); + } + assertEquals(0, active, "There should be no pending accepts"); } });