From 1a710438892cd4599841130ee5f78c506a39eb30 Mon Sep 17 00:00:00 2001 From: Hellblazer Date: Fri, 17 Nov 2023 18:15:31 -0800 Subject: [PATCH] clean up --- .../java/com/salesforce/apollo/ethereal/Checks.java | 12 ------------ .../com/salesforce/apollo/ethereal/EtherealTest.java | 12 +++--------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Checks.java b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Checks.java index adf13faa37..105ec5a19e 100644 --- a/ethereal/src/main/java/com/salesforce/apollo/ethereal/Checks.java +++ b/ethereal/src/main/java/com/salesforce/apollo/ethereal/Checks.java @@ -16,18 +16,6 @@ */ public interface Checks { - static final List> ConsensusChecks = Arrays.asList(basicCorrectness(), - parentConsistency(), - noSelfForkingEvidence(), - forkerMuting()); - static final int MaxDtaBytesPerUnit = (int) 2e6; - static final int MaxRandomSourceDataBytesPerUnit = (int) 1e6; - static final int MaxUnitsInChunk = (int) 1e6; - static final List> SetupChecks = Arrays.asList(basicCorrectness(), - parentConsistency(), - noLevelSkipping(), - noForks()); - static BiFunction basicCorrectness() { return (u, dag) -> { var parents = u.parents(); diff --git a/ethereal/src/test/java/com/salesforce/apollo/ethereal/EtherealTest.java b/ethereal/src/test/java/com/salesforce/apollo/ethereal/EtherealTest.java index ccd4e3fd65..f755bae94a 100644 --- a/ethereal/src/test/java/com/salesforce/apollo/ethereal/EtherealTest.java +++ b/ethereal/src/test/java/com/salesforce/apollo/ethereal/EtherealTest.java @@ -33,7 +33,9 @@ import java.security.SecureRandom; import java.time.Duration; import java.util.*; -import java.util.concurrent.*; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.IntStream; @@ -113,7 +115,6 @@ private void one(int iteration) produced.add(new CopyOnWriteArrayList<>()); } - List executors = new ArrayList<>(); final var prefix = UUID.randomUUID().toString(); int maxSize = 1024 * 1024; for (short i = 0; i < (short) NPROC; i++) { @@ -160,13 +161,6 @@ private void one(int iteration) controllers.forEach(e -> e.stop()); gossipers.forEach(e -> e.stop()); comms.forEach(e -> e.close(Duration.ofSeconds(1))); - executors.forEach(executor -> { - executor.shutdown(); - try { - executor.awaitTermination(1, TimeUnit.SECONDS); - } catch (InterruptedException e1) { - } - }); } final var expected = NUM_EPOCHS * (EPOCH_LENGTH - 1);