diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-27 14:37:50 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-27 14:37:50 +0200 |
| commit | 3919d141328dd51e6e9c5f94bb7e58e216e4e13a (patch) | |
| tree | 2d59da1be3b03db37b8aea15f409dc9a6056516b /src/test | |
| parent | f797489f30e76e8afcd8b8eb1fd16c79e9cd1363 (diff) | |
Extend Raft replay to 60 seconds
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/java/simulator/builder/SimulationBuilderTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/java/simulator/builder/SimulationBuilderTest.java b/src/test/java/simulator/builder/SimulationBuilderTest.java index 3992688..a5b25a0 100644 --- a/src/test/java/simulator/builder/SimulationBuilderTest.java +++ b/src/test/java/simulator/builder/SimulationBuilderTest.java @@ -75,12 +75,15 @@ class SimulationBuilderTest { void testCreateRaftSimulation() throws Exception { String filename = TEST_DIR + "test-raft.dat"; - SimulationFactory.createRaftSimulation() + SimulationBuilder builder = SimulationFactory.createRaftSimulation(); + builder .save(filename); File file = new File(filename); assertTrue(file.exists(), "Simulation file should be created"); assertTrue(file.length() > 10000, "Raft simulation should be larger"); + assertEquals(60, builder.getSimulator().getPrefs().getInteger("sim.seconds"), + "Raft simulation should replay for 60 seconds"); String content = new String(Files.readAllBytes(file.toPath()), StandardCharsets.ISO_8859_1); |
