Skip to content

Commit

Permalink
skip tests with empty blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianHuc committed Oct 10, 2024
1 parent aabc693 commit 6d0fb0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void launcherSessionClosed(LauncherSession session) {
try {
String directory = setFileDirectory();
log.info("Reference test will be written to file {}\\{}", directory, JSON_OUTPUT_FILENAME);
Void result = writeToJsonFile().get();
writeToJsonFile().get();
log.info("Reference test results written to file {}", JSON_OUTPUT_FILENAME);
log.info("Path exists: {}, file exist: {}", Paths.get(directory).toFile().exists(), Paths.get(directory).resolve(JSON_OUTPUT_FILENAME).toFile().exists());
} catch (InterruptedException | ExecutionException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.hyperledger.besu.ethereum.referencetests.ReferenceTestProtocolSchedules;
import org.hyperledger.besu.ethereum.rlp.RLPException;
import org.hyperledger.besu.testutil.JsonTestParameters;
import org.junit.jupiter.api.Assumptions;

@Slf4j
public class BlockchainReferenceTestTools {
Expand Down Expand Up @@ -197,6 +198,8 @@ public static void executeTest(final BlockchainReferenceTestCaseSpec spec) {
try {
final Block block = candidateBlock.getBlock();

Assumptions.assumeTrue(block.getBody().getTransactions().size() > 0, "Skipping the test because the block has no transaction");

zkTracer.traceStartBlock(block.getHeader());

final ProtocolSpec protocolSpec = schedule.getByBlockHeader(block.getHeader());
Expand Down

0 comments on commit 6d0fb0e

Please sign in to comment.