Skip to content

Commit 5f2e3fd

Browse files
Disable network synchronizer to hopefully fix sporadic test failures
1 parent c94ef73 commit 5f2e3fd

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,20 @@ loom {
6868
accessWidenerPath = file("src/main/resources/wurst.accesswidener")
6969

7070
runs {
71+
clientGameTest {
72+
vmArgs.add("-Dfabric.client.gametest.disableNetworkSynchronizer=true")
73+
}
74+
7175
clientWithMods {
7276
inherit client
7377
}
74-
78+
7579
clientGameTestWithMods {
7680
inherit client
7781
source = sourceSets.gametest
7882
runDir = "build/run/clientGameTestWithMods"
7983
vmArgs.add("-Dfabric.client.gametest")
84+
vmArgs.add("-Dfabric.client.gametest.disableNetworkSynchronizer=true")
8085
vmArgs.add("-Dwurst.test.withMods=true")
8186
programArgs.add("--username=Wurst-Bot")
8287
}

src/gametest/java/net/wurstclient/gametest/WurstTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import net.fabricmc.fabric.api.client.gametest.v1.context.TestServerContext;
2424
import net.fabricmc.fabric.api.client.gametest.v1.context.TestSingleplayerContext;
2525
import net.fabricmc.fabric.api.client.gametest.v1.world.TestWorldBuilder;
26+
import net.fabricmc.fabric.impl.client.gametest.TestSystemProperties;
2627
import net.minecraft.SharedConstants;
2728
import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState;
2829
import net.minecraft.world.level.block.Blocks;
@@ -42,6 +43,9 @@ public class WurstTest implements FabricClientGameTest
4243
@Override
4344
public void runTest(ClientGameTestContext context)
4445
{
46+
if(!TestSystemProperties.DISABLE_NETWORK_SYNCHRONIZER)
47+
throw new RuntimeException("Network synchronizer is not disabled");
48+
4549
LOGGER.info("Starting Wurst Client GameTest");
4650
hideSplashTexts(context);
4751
waitForTitleScreenFade(context);

0 commit comments

Comments
 (0)