Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove delay in tests #7115

Open
wants to merge 7 commits into
base: dev/feature
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/java/ch/njol/skript/Skript.java
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,10 @@ protected void afterErrors() {
debug("Early init done");

if (TestMode.ENABLED) {
Bukkit.getScheduler().runTaskLater(Skript.this, () -> info("Skript testing environment enabled, starting soon..."), 1);
// Ignore late init (scripts, etc.) in test mode
Bukkit.getScheduler().runTaskLater(Skript.this, () -> {
info("Skript testing environment enabled, starting...");

// Delay is in Minecraft ticks.
AtomicLong shutdownDelay = new AtomicLong(0);
List<Class<?>> asyncTests = new ArrayList<>();
Expand Down Expand Up @@ -778,7 +779,7 @@ protected void afterErrors() {
Bukkit.getServer().shutdown();
}, shutdownDelay.get());
});
}, 100);
}, 5);
}

Skript.metrics = new Metrics(Skript.getInstance(), 722); // 722 is our bStats plugin ID
Expand Down