fix(test): await durable native publications
Release / release (push) Failing after 10m28s

This commit is contained in:
dmg committed 2026-09-23 17:49:28 -04:00
1 parent 720fdc1687
commit cf2e013f74
2 files changed
+4 -4

No files matched your search

@@ -35,11 +35,11 @@ final class AdventureParticipationModeNativeTest {
new String[]{"adventure-site", "place", "camp", "--"}));
assertEquals(List.of("individual-only"), f.command.tabComplete(admin.player, "fantasystick",
new String[]{"adventure-site", "place", "camp", "--mode", "i"}));
f.command.execute(admin.player, "fantasystick", new String[]{"adventure-site", "place", "camp",
"--mode", "individual-only", "10", "Solo Camp"});
drain(f);
var adventures = (AdventureQuestDirectory) FantasyStickLifecycleNativeTest.Fixture.field(f.plugin,
"adventureQuests");
f.command.execute(admin.player, "fantasystick", new String[]{"adventure-site", "place", "camp",
"--mode", "individual-only", "10", "Solo Camp"});
await(f, () -> !adventures.snapshot().sites().isEmpty());
var site = adventures.snapshot().sites().getFirst();
assertEquals(AdventureQuestState.ParticipationMode.INDIVIDUAL_ONLY, site.participationMode());
assertTrue(admin.messages.getLast().contains("mode=individual-only"));
@@ -86,7 +86,7 @@ class FantasyHealthNativeTest {
var death = new org.bukkit.event.entity.PlayerDeathEvent(a.player, source, new java.util.ArrayList<>(), 0,
net.kyori.adventure.text.Component.empty(), true);
f.dispatcher.accept(death); assertTrue(death.isCancelled());
PartyBookNativeTest.drain(f);
for(int attempt=0;attempt<80&&a.core.inventory.getItemInOffHand().getType()!=org.bukkit.Material.WRITTEN_BOOK;attempt++){var task=f.tasks.poll(20,java.util.concurrent.TimeUnit.MILLISECONDS);if(task!=null)task.run();Thread.sleep(5);}
assertEquals(1, receivedDust(a, org.bukkit.Color.RED), "Aura opt-out must not hide the defeat burst");
assertTrue(a.particleCalls.stream().anyMatch(call -> java.util.Arrays.asList(call).contains(defeatLocation)));
assertEquals(entry, a.player.getLocation()); assertEquals(28, a.player.getHealth());