yeg
2026-09-01 d1cb58bebb89c000275d9b092dd644c809296707
ruoyi-device/src/test/java/com/ruoyi/device/bts/BtsDevelopmentSimulatorRecordStepCycleTest.java
@@ -65,7 +65,10 @@
                    .map(BtsExcelFixture.FixtureRecord::stepNo).distinct().toList();
            var actualSteps = snapshot.rows().stream().filter(row -> "STEP".equals(row.rowType()))
                    .map(BtsDevelopmentSimulator.BtsTestPlanRow::stepNo).toList();
            var cyclePositions = snapshot.rows().stream().filter(row -> "STEP".equals(row.rowType()))
                    .map(BtsDevelopmentSimulator.BtsTestPlanRow::cyclePosition).toList();
            assertEquals(expectedSteps, actualSteps);
            assertEquals(java.util.stream.IntStream.rangeClosed(1, expectedSteps.size()).boxed().toList(), cyclePositions);
            assertTrue(snapshot.rows().stream().anyMatch(row -> "STEP".equals(row.rowType()) && "进行中".equals(row.executionStatus())));
            assertTrue(snapshot.rows().stream().anyMatch(row -> "STEP".equals(row.rowType()) && "待执行".equals(row.executionStatus())));
            var cycleRow = snapshot.rows().stream().filter(row -> "CYCLE".equals(row.rowType())).findFirst().orElseThrow();
@@ -75,6 +78,22 @@
    }
    @Test
    void forcedFirstCycleKeepsUnstartedTestPlanIndependentOfSharedPlayback() throws Exception
    {
        InMemoryBtsSimulatorStateStore store = new InMemoryBtsSimulatorStateStore();
        try (BtsDevelopmentSimulator simulator = new BtsDevelopmentSimulator(0, store))
        {
            simulator.updateChannel(1, 1, true, DeviceWorkStatus.WORKING);
            simulator.nextBtsCycle(1, 1);
            simulator.nextBtsCycle(1, 1);
            var snapshot = simulator.btsTest(1, 1, 1);
            assertEquals(1, snapshot.currentCycleNo());
            assertTrue(snapshot.rows().stream().filter(row -> "STEP".equals(row.rowType()))
                    .allMatch(row -> "待执行".equals(row.executionStatus())));
        }
    }
    @Test
    void playbackSpeedPauseResumeAndRestartAreIndependentOfDeviceStatus() throws Exception
    {
        Instant start = Instant.parse("2026-08-31T00:00:00Z");