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 MempoolSanityTest method when_submitting_items_to_null_mempool__then_test_should_fail.
/**
* TODO: This is more of a test for mempoolSubmissionSteadyState, should move somewhere else
*/
@Test
public void when_submitting_items_to_null_mempool__then_test_should_fail() {
SimulationTest simulationTest = bftTestBuilder.addOverrideModuleToAllInitialNodes(new AbstractModule() {
@Override
protected void configure() {
bind(new TypeLiteral<Mempool<Txn>>() {
}).toInstance(Mempools.empty());
}
}).build();
final var checkResults = simulationTest.run().awaitCompletion();
assertThat(checkResults).hasEntrySatisfying(Monitor.MEMPOOL_COMMITTED, error -> assertThat(error).isPresent());
}
use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class RandomValidatorsTest 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());
}
Aggregations