From 302e43fd552326e1b76d6244f2abe9688d3318b3 Mon Sep 17 00:00:00 2001 From: Evan Saulpaugh Date: Thu, 20 Feb 2020 11:00:35 -0600 Subject: [PATCH] update exhaustiveFuzz --- .../com/esaulpaugh/headlong/rlp/RLPDecoderTest.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/esaulpaugh/headlong/rlp/RLPDecoderTest.java b/src/test/java/com/esaulpaugh/headlong/rlp/RLPDecoderTest.java index 87df193a6..407fd5ae2 100644 --- a/src/test/java/com/esaulpaugh/headlong/rlp/RLPDecoderTest.java +++ b/src/test/java/com/esaulpaugh/headlong/rlp/RLPDecoderTest.java @@ -114,12 +114,14 @@ public void exhaustiveFuzz() throws InterruptedException { tasks[i] = new ExhaustiveFuzzTask(new byte[] { (byte) i, 0, 0, 0 }); executorService.submit(tasks[i]); } - long valid = 0, invalid = 0; executorService.shutdown(); - executorService.awaitTermination(12L, TimeUnit.MINUTES); + executorService.awaitTermination(35L, TimeUnit.MINUTES); + long valid = 0, invalid = 0; for (ExhaustiveFuzzTask task : tasks) { - valid += task.valid; - invalid += task.invalid; + if(task != null) { + valid += task.valid; + invalid += task.invalid; + } } System.out.println(valid + " / " + (valid + invalid) + " (" + invalid + " invalid)"); }