Skip to content

Commit 1954f8e

Browse files
committed
Fix RS Integrator test flakiness
1 parent f8e6df9 commit 1954f8e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/testMod/kotlin/de/srendi/advancedperipherals/test/PeripheralTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class PeripheralTest {
4242
thenComputerOk();
4343
}
4444

45-
@GameTest
45+
@GameTest(timeoutTicks = 300)
4646
fun rsIntegrator(context: GameTestHelper) = context.sequence {
4747
thenComputerOk();
4848
}

src/testMod/resources/data/advancedperipheralstest/computer/tests/peripheraltest.rsintegrator.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ test.assert(second.getInput("back"), "Digital input should be true for Redstone
1919

2020
-- Test output on the right integrator
2121
second.setOutput("front", true)
22+
sleep(1)
2223
test.assert(second.getOutput("front"), "Digital output should be true")
2324

2425
-- Test analog input on the left integrator (wired from the right integrator)
2526
test.eq(13, first.getAnalogInput("front"), "Analog input should be 13")
2627

2728
-- Test analog output on the right integrator
2829
second.setAnalogOutput("front", 10)
30+
sleep(1)
2931
test.eq(10, second.getAnalogOutput("front"), "Analog output should be 10")
3032

3133
-- Test analog input on the left integrator (wired from the right integrator)

0 commit comments

Comments
 (0)