diff --git a/fireflies/src/test/java/com/salesforce/apollo/fireflies/ChurnTest.java b/fireflies/src/test/java/com/salesforce/apollo/fireflies/ChurnTest.java index 9825e45f6..64b249b3a 100644 --- a/fireflies/src/test/java/com/salesforce/apollo/fireflies/ChurnTest.java +++ b/fireflies/src/test/java/com/salesforce/apollo/fireflies/ChurnTest.java @@ -273,6 +273,7 @@ private void initialize() { AtomicBoolean frist = new AtomicBoolean(true); final var prefix = UUID.randomUUID().toString(); final var gatewayPrefix = UUID.randomUUID().toString(); + var executor = UnsafeExecutors.newVirtualThreadPerTaskExecutor(); views = members.values().stream().map(node -> { DynamicContext context = ctxBuilder.build(); FireflyMetricsImpl metrics = new FireflyMetricsImpl(context.getId(), @@ -282,14 +283,15 @@ private void initialize() { .setMetrics( new ServerConnectionCacheMetricsImpl( frist.getAndSet(false) ? node0Registry - : registry))); + : registry)), + executor); var gateway = new LocalServer(gatewayPrefix, node).router(ServerConnectionCache.newBuilder() .setTarget(200) .setMetrics( new ServerConnectionCacheMetricsImpl( frist.getAndSet(false) - ? node0Registry - : registry))); + ? node0Registry : registry)), + executor); comms.start(); communications.add(comms); diff --git a/fireflies/src/test/java/com/salesforce/apollo/fireflies/MtlsTest.java b/fireflies/src/test/java/com/salesforce/apollo/fireflies/MtlsTest.java index bc805d703..37cbf6ed7 100644 --- a/fireflies/src/test/java/com/salesforce/apollo/fireflies/MtlsTest.java +++ b/fireflies/src/test/java/com/salesforce/apollo/fireflies/MtlsTest.java @@ -118,6 +118,7 @@ public void smoke() throws Exception { var frist = new AtomicBoolean(true); var clientContextSupplier = clientContextSupplier(); + var executor = UnsafeExecutors.newVirtualThreadPerTaskExecutor(); views = members.stream().map(node -> { DynamicContext context = ctxBuilder.build(); FireflyMetricsImpl metrics = new FireflyMetricsImpl(context.getId(), @@ -127,7 +128,7 @@ public void smoke() throws Exception { builder.setMetrics(new ServerConnectionCacheMetricsImpl(frist.getAndSet(false) ? node0Registry : registry)); CertificateWithPrivateKey certWithKey = certs.get(node.getId()); Router comms = new MtlsServer(node, ep, clientContextSupplier, serverContextSupplier(certWithKey)).router( - builder); + builder, executor); communications.add(comms); return new View(context, node, endpoints.get(node.getId()), EventValidation.NONE, Verifiers.NONE, comms, parameters, DigestAlgorithm.DEFAULT, metrics); diff --git a/fireflies/src/test/java/com/salesforce/apollo/fireflies/SwarmTest.java b/fireflies/src/test/java/com/salesforce/apollo/fireflies/SwarmTest.java index 0e4f93dc6..51a88234d 100644 --- a/fireflies/src/test/java/com/salesforce/apollo/fireflies/SwarmTest.java +++ b/fireflies/src/test/java/com/salesforce/apollo/fireflies/SwarmTest.java @@ -230,19 +230,21 @@ private void initialize() { DynamicContext context = ctxBuilder.build(); FireflyMetricsImpl metrics = new FireflyMetricsImpl(context.getId(), frist.getAndSet(false) ? node0Registry : registry); + var executor = UnsafeExecutors.newVirtualThreadPerTaskExecutor(); var comms = new LocalServer(prefix, node).router(ServerConnectionCache.newBuilder() .setTarget(200) .setMetrics( new ServerConnectionCacheMetricsImpl( frist.getAndSet(false) ? node0Registry - : registry))); + : registry)), + executor); var gateway = new LocalServer(gatewayPrefix, node).router(ServerConnectionCache.newBuilder() .setTarget(200) .setMetrics( new ServerConnectionCacheMetricsImpl( frist.getAndSet(false) - ? node0Registry - : registry))); + ? node0Registry : registry)), + executor); comms.start(); communications.add(comms);