mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-24 08:38:17 -05:00
Optimize screenshot delays in automated client test (#4178)
* Optimize screenshot delays I've done multiple test runs on GitHub Actions and this seems to be as low as the timings can go while still reliably generating all of the screenshots correctly. * Increase wait interval in waitFor to 50ms
This commit is contained in:
parent
6c3b5d4971
commit
d21566ae3c
2 changed files with 4 additions and 4 deletions
|
@ -113,7 +113,7 @@ public class FabricApiAutoTestClient implements ClientModInitializer {
|
|||
{
|
||||
enableDebugHud();
|
||||
waitForWorldTicks(200);
|
||||
takeScreenshot("in_game_overworld");
|
||||
takeScreenshot("in_game_overworld", Duration.ZERO);
|
||||
}
|
||||
|
||||
MixinEnvironment.getCurrentEnvironment().audit();
|
||||
|
@ -147,7 +147,7 @@ public class FabricApiAutoTestClient implements ClientModInitializer {
|
|||
server.runCommand("gamemode creative " + profile.getName());
|
||||
|
||||
waitForWorldTicks(20);
|
||||
takeScreenshot("server_in_game");
|
||||
takeScreenshot("server_in_game", Duration.ZERO);
|
||||
|
||||
{ // Test that we can enter and exit configuration
|
||||
server.runCommand("debugconfig config " + profile.getName());
|
||||
|
|
|
@ -82,7 +82,7 @@ public final class FabricClientTestHelper {
|
|||
}
|
||||
|
||||
public static void takeScreenshot(String name) {
|
||||
takeScreenshot(name, Duration.ofSeconds(1));
|
||||
takeScreenshot(name, Duration.ofMillis(50));
|
||||
}
|
||||
|
||||
public static void takeScreenshot(String name, Duration delay) {
|
||||
|
@ -200,7 +200,7 @@ public final class FabricClientTestHelper {
|
|||
throw new RuntimeException("Timed out waiting for " + what);
|
||||
}
|
||||
|
||||
waitFor(Duration.ofSeconds(1));
|
||||
waitFor(Duration.ofMillis(50));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue