Skip to content

Commit a05316c

Browse files
committed
test: VirtualThreadConnectTest: Relax parameters
Failed spuriously on Windows
1 parent a320293 commit a05316c

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

junixsocket-common/src/test/java/org/newsclub/net/unix/domain/VirtualThreadConnectTest.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,23 @@
3232
import org.newsclub.net.unix.AFUNIXServerSocket;
3333
import org.newsclub.net.unix.AFUNIXSocket;
3434
import org.newsclub.net.unix.AFUNIXSocketAddress;
35+
import org.newsclub.net.unix.ThreadUtil;
36+
37+
import com.kohlschutter.testutil.TestAbortedNotAnIssueException;
3538

3639
@SuppressWarnings("all")
3740
public class VirtualThreadConnectTest {
3841
@Test
3942
public void testBlockingReadCompletesForAllClients() throws Exception {
40-
final int clients = 64;
43+
if (!ThreadUtil.isVirtualThreadSupported()) {
44+
throw new TestAbortedNotAnIssueException("Virtual threads not supported");
45+
}
46+
47+
final int clients = Runtime.getRuntime().availableProcessors();
4148
final int serverDelayMillis = 20;
4249
final int timeoutSeconds = 60;
4350
final byte payload = 0x2A;
44-
final int connectTimeoutMs = 100;
51+
final int connectTimeoutMs = 5000;
4552

4653
Path socketPath = Files.createTempFile("junixsocket-vt-", ".sock");
4754

0 commit comments

Comments
 (0)