Skip to content

Commit

Permalink
use 2 UE in ff tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed Jun 9, 2024
1 parent 865b6bf commit 4c1e1fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class ChurnTest {
private MetricRegistry registry;
private List<View> views;
private ExecutorService executor;
private ExecutorService executor2;

@BeforeAll
public static void beforeClass() throws Exception {
Expand Down Expand Up @@ -84,6 +85,9 @@ public void after() {
if (executor != null) {
executor.shutdown();
}
if (executor2 != null) {
executor2.shutdown();
}
}

@Test
Expand Down Expand Up @@ -266,6 +270,7 @@ public void churn() throws Exception {

private void initialize() {
executor = UnsafeExecutors.newVirtualThreadPerTaskExecutor();
executor2 = UnsafeExecutors.newVirtualThreadPerTaskExecutor();
var parameters = Parameters.newBuilder().setMaximumTxfr(20).build();
registry = new MetricRegistry();
node0Registry = new MetricRegistry();
Expand Down Expand Up @@ -296,7 +301,7 @@ private void initialize() {
new ServerConnectionCacheMetricsImpl(
frist.getAndSet(false)
? node0Registry : registry)),
executor);
executor2);
comms.start();
communications.add(comms);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public class SwarmTest {
private MetricRegistry registry;
private List<View> views;
private ExecutorService executor;
private ExecutorService executor2;

@BeforeAll
public static void beforeClass() throws Exception {
Expand Down Expand Up @@ -94,6 +95,9 @@ public void after() {
if (executor != null) {
executor.shutdown();
}
if (executor2 != null) {
executor2.shutdown();
}
}

@Test
Expand Down Expand Up @@ -210,6 +214,7 @@ public void swarm() throws Exception {

private void initialize() {
executor = UnsafeExecutors.newVirtualThreadPerTaskExecutor();
executor2 = UnsafeExecutors.newVirtualThreadPerTaskExecutor();
var parameters = Parameters.newBuilder()
.setMaxPending(50)
.setMaximumTxfr(20)
Expand Down Expand Up @@ -249,7 +254,7 @@ private void initialize() {
new ServerConnectionCacheMetricsImpl(
frist.getAndSet(false)
? node0Registry : registry)),
executor);
executor2);
comms.start();
communications.add(comms);

Expand Down

0 comments on commit 4c1e1fb

Please sign in to comment.