Skip to content

Commit

Permalink
Fix flaky warp+force lens test
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealWormbo committed Apr 2, 2024
1 parent a1361b3 commit 22ebcbc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public void testWarpForceLens(GameTestHelper helper) {
setUpLensesAndBindings(helper, BotaniaItems.lensWarp, BotaniaItems.lensPiston);

helper.startSequence()
.thenExecute(() -> helper.pressButton(BUTTON_POS))
// short delay to ensure spreader picks up mana from pool
.thenExecuteAfter(1, () -> helper.pressButton(BUTTON_POS))
.thenWaitUntil(() -> helper.assertBlockProperty(BUTTON_POS, ButtonBlock.POWERED, false))
.thenExecute(() -> {
helper.assertBlock(RELAY_POS, BotaniaBlocks.pistonRelay::equals, () -> "Force relay moved");
Expand Down Expand Up @@ -63,7 +64,8 @@ public void testForceWarpLens(GameTestHelper helper) {
setUpLensesAndBindings(helper, BotaniaItems.lensPiston, BotaniaItems.lensWarp);

helper.startSequence()
.thenExecute(() -> helper.pressButton(BUTTON_POS))
// short delay to ensure spreader picks up mana from pool
.thenExecuteAfter(1, () -> helper.pressButton(BUTTON_POS))
.thenWaitUntil(() -> helper.assertBlockProperty(BUTTON_POS, ButtonBlock.POWERED, false))
.thenExecute(() -> {
helper.assertBlockState(RELAY_POS, BlockState::isAir, () -> "Force relay did not move");
Expand Down

0 comments on commit 22ebcbc

Please sign in to comment.