use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class MempoolFillTest method sanity_tests_should_pass.
@Test
@Ignore("Travis not playing nice")
public void sanity_tests_should_pass() {
SimulationTest simulationTest = bftTestBuilder.build();
final var runningTest = simulationTest.run();
final var results = runningTest.awaitCompletion();
// Post conditions
assertThat(results).allSatisfy((name, err) -> AssertionsForClassTypes.assertThat(err).isEmpty());
long invalidCommandsCount = runningTest.getNetwork().getSystemCounters().values().stream().map(s -> s.get(SystemCounters.CounterType.RADIX_ENGINE_INVALID_PROPOSED_COMMANDS)).mapToLong(l -> l).sum();
assertThat(invalidCommandsCount).isZero();
}
use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class MempoolFillTest method filler_should_overwhelm_unratelimited_mempool.
@Test
@Ignore("Travis not playing nicely with timeouts so disable for now until fixed.")
public void filler_should_overwhelm_unratelimited_mempool() {
SimulationTest simulationTest = bftTestBuilder.addOverrideModuleToAllInitialNodes(MempoolConfig.asModule(100, 0)).build();
final var results = simulationTest.run().awaitCompletion();
assertThat(results).hasValueSatisfying(new Condition<>(Optional::isPresent, "Error exists"));
}
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 results = simulationTest.run().awaitCompletion();
assertThat(results).allSatisfy((name, err) -> AssertionsForClassTypes.assertThat(err).isEmpty());
}
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 results = simulationTest.run(Duration.ofMinutes(1)).awaitCompletion();
assertThat(results).allSatisfy((name, err) -> AssertionsForClassTypes.assertThat(err).isEmpty());
}
use of com.radixdlt.harness.simulation.SimulationTest in project radixdlt by radixdlt.
the class RandomVoteAndViewTimeoutDropperTest method sanity_test.
/**
* Tests a configuration of 4 nodes with a dropping proposal adversary Test should fail with
* GetVertices RPC disabled
*/
@Test
public void sanity_test() {
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_VERTEX_STORE_FORKS)).mapToLong(l -> l).summaryStatistics();
System.out.println(statistics);
assertThat(checkResults).allSatisfy((name, error) -> AssertionsForClassTypes.assertThat(error).isNotPresent());
}
Aggregations