Skip to content

Commit 80db0d0

Browse files
committed
Fix testRunTransactionWithFailure
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
1 parent 4aad685 commit 80db0d0

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/parallelization/ParallelBlockTransactionProcessorTest.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import static org.hyperledger.besu.ethereum.trie.pathbased.common.worldview.WorldStateConfig.createStatefulConfigWithTrie;
1818
import static org.junit.jupiter.api.Assertions.assertEquals;
19+
import static org.junit.jupiter.api.Assertions.assertFalse;
1920
import static org.junit.jupiter.api.Assertions.assertTrue;
2021
import static org.mockito.ArgumentMatchers.any;
2122
import static org.mockito.ArgumentMatchers.argThat;
@@ -280,9 +281,14 @@ void testRunTransactionWithFailure(final ProcessorVariant variant) {
280281
Optional.empty(),
281282
Optional.empty());
282283

283-
assertTrue(
284-
maybeResult.isEmpty(),
285-
"Expected empty result so the block processor re-executes the transaction");
284+
if (variant == ProcessorVariant.BAL) {
285+
assertFalse(maybeResult.isEmpty(), "Expected non-empty result for the BAL variant");
286+
assertTrue(maybeResult.get().getStatus() == TransactionProcessingResult.Status.FAILED);
287+
} else {
288+
assertTrue(
289+
maybeResult.isEmpty(),
290+
"Expected empty result so the block processor re-executes the transaction");
291+
}
286292
}
287293

288294
@Test

0 commit comments

Comments
 (0)