use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class SanityTest method sanity_tests_should_pass.
@Test
public void sanity_tests_should_pass() {
SimulationTest simulationTest = bftTestBuilder.build();
final var checkResults = simulationTest.run().awaitCompletion();
assertThat(checkResults).allSatisfy((name, err) -> AssertionsForClassTypes.assertThat(err).isEmpty());
}
use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class MovingWindowValidatorsTest method given_correct_3_node_bft_with_4_total_nodes_with_changing_epochs_per_100_views__then_should_pass_bft_and_epoch_invariants.
@Test
public void given_correct_3_node_bft_with_4_total_nodes_with_changing_epochs_per_100_views__then_should_pass_bft_and_epoch_invariants() {
SimulationTest bftTest = bftTestBuilder.numNodes(4).ledgerAndEpochs(View.of(100), windowedEpochToNodesMapper(3, 4)).pacemakerTimeout(1000).addTestModules(ConsensusMonitors.liveness(1, TimeUnit.SECONDS), ConsensusMonitors.epochCeilingView(View.of(100))).build();
final var checkResults = bftTest.run().awaitCompletion();
assertThat(checkResults).allSatisfy((name, err) -> assertThat(err).isEmpty());
}
use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class OneNodeNeverSendEpochResponseTest method given_deterministic_randomized_validator_sets__then_should_pass_bft_and_epoch_invariants.
@Test
public void given_deterministic_randomized_validator_sets__then_should_pass_bft_and_epoch_invariants() {
SimulationTest bftTest = bftTestBuilder.build();
final var checkResults = bftTest.run().awaitCompletion();
assertThat(checkResults).allSatisfy((name, err) -> AssertionsForClassTypes.assertThat(err).isEmpty());
}
use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class RandomValidatorsTest method given_nondeterministic_randomized_validator_sets__then_should_fail.
@Test
public void given_nondeterministic_randomized_validator_sets__then_should_fail() {
SimulationTest bftTest = bftTestBuilder.ledgerAndEpochs(View.of(100), badRandomEpochToNodesMapper()).build();
final var checkResults = bftTest.run().awaitCompletion();
assertThat(checkResults).hasValueSatisfying(new Condition<>(Optional::isPresent, "Has error"));
}
use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class RandomValidatorsTest method when_random_validators__then_sanity_checks_should_pass.
@Test
public void when_random_validators__then_sanity_checks_should_pass() {
SimulationTest simulationTest = bftTestBuilder.build();
final var checkResults = simulationTest.run().awaitCompletion();
assertThat(checkResults).allSatisfy((name, err) -> AssertionsForClassTypes.assertThat(err).isEmpty());
}
Aggregations