diff --git a/proxy/src/test/java/com/velocitypowered/proxy/scheduler/VelocitySchedulerTest.java b/proxy/src/test/java/com/velocitypowered/proxy/scheduler/VelocitySchedulerTest.java index 70cd20b100..e31a8a7e3f 100644 --- a/proxy/src/test/java/com/velocitypowered/proxy/scheduler/VelocitySchedulerTest.java +++ b/proxy/src/test/java/com/velocitypowered/proxy/scheduler/VelocitySchedulerTest.java @@ -76,12 +76,12 @@ void obtainTasksFromPlugin() throws Exception { scheduler.buildTask(FakePluginManager.PLUGIN_A, task -> { runningLatch.countDown(); - task.cancel(); try { endingLatch.await(); } catch (InterruptedException ignored) { Thread.currentThread().interrupt(); } + task.cancel(); }).delay(50, TimeUnit.MILLISECONDS) .repeat(Duration.ofMillis(5)) .schedule();