File tree Expand file tree Collapse file tree
junixsocket-common/src/test/java/org/newsclub/net/unix/domain Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232import org .newsclub .net .unix .AFUNIXServerSocket ;
3333import org .newsclub .net .unix .AFUNIXSocket ;
3434import org .newsclub .net .unix .AFUNIXSocketAddress ;
35+ import org .newsclub .net .unix .ThreadUtil ;
36+
37+ import com .kohlschutter .testutil .TestAbortedNotAnIssueException ;
3538
3639@ SuppressWarnings ("all" )
3740public 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
You can’t perform that action at this time.
0 commit comments