use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class OutOfOrderTest method out_of_order_messaging_should_not_affect_properties_of_system.
@Test
public void out_of_order_messaging_should_not_affect_properties_of_system() {
SimulationTest test = bftTestBuilder.build();
final var runningTest = test.run();
final var checkResults = runningTest.awaitCompletion();
LongSummaryStatistics statistics = runningTest.getNetwork().getSystemCounters().values().stream().map(s -> s.get(CounterType.BFT_SYNC_REQUESTS_SENT)).mapToLong(l -> l).summaryStatistics();
logger.info(statistics);
assertThat(checkResults).allSatisfy((name, error) -> assertThat(error).isNotPresent());
}
use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class RandomLatencyTest method given_4_correct_bfts_in_random_network_and_no_sync__then_all_synchronous_checks_should_pass.
/**
* Tests a static configuration of 4 nodes with random, high variance in latency
*/
@Test
public void given_4_correct_bfts_in_random_network_and_no_sync__then_all_synchronous_checks_should_pass() {
SimulationTest test = bftTestBuilder.numNodes(4).build();
final var runningTest = test.run();
final var checkResults = runningTest.awaitCompletion();
assertThat(checkResults).allSatisfy((name, error) -> assertThat(error).isNotPresent());
}
use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class OneOutOfBoundsTest method sanity_tests_should_pass.
@Test
public void sanity_tests_should_pass() {
SimulationTest simulationTest = bftTestBuilder.build();
final var results = simulationTest.run(Duration.ofMinutes(2)).awaitCompletion();
assertThat(results).allSatisfy((name, err) -> AssertionsForClassTypes.assertThat(err).isEmpty());
}
use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class FPlusOneOutOfBoundsTest method given_0_out_of_3_nodes_out_of_synchrony_bounds.
/**
* Tests a configuration of 0 out of 3 nodes out of synchrony bounds
*/
@Test
public void given_0_out_of_3_nodes_out_of_synchrony_bounds() {
SimulationTest test = bftTestBuilder.numNodes(3).networkModules(NetworkOrdering.inOrder(), NetworkLatencies.fixed(LATENCY_MS)).build();
final var runningTest = test.run();
final var checkResults = runningTest.awaitCompletion();
assertThat(checkResults).allSatisfy((name, error) -> assertThat(error).isNotPresent());
}
use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class FProposalsPerViewDropperTest method given_get_vertices_enabled__then_test_should_succeed_against_drop_proposal_adversary.
/**
* Tests a configuration of 4 nodes with a dropping proposal adversary Test should fail with
* GetVertices RPC disabled
*/
@Test
public void given_get_vertices_enabled__then_test_should_succeed_against_drop_proposal_adversary() {
SimulationTest test = bftTestBuilder.build();
final var runningTest = test.run();
final var checkResults = runningTest.awaitCompletion();
assertThat(checkResults).allSatisfy((name, error) -> assertThat(error).isNotPresent());
}
Aggregations