-
Notifications
You must be signed in to change notification settings - Fork 520
26.1: ClientGameTest hangs upon disconnecting the world #5277
Copy link
Copy link
Closed
Description
Reproducer on top of fabric-example-mod:
package com.example.test;
import net.fabricmc.fabric.api.client.gametest.v1.FabricClientGameTest;
import net.fabricmc.fabric.api.client.gametest.v1.context.ClientGameTestContext;
import net.fabricmc.fabric.api.client.gametest.v1.context.TestSingleplayerContext;
public class HangReproducerTest implements FabricClientGameTest {
@Override
public void runTest(ClientGameTestContext context) {
// Simply creating and closing a singleplayer world hangs.
try (TestSingleplayerContext world = context.worldBuilder().create()) {
world.getClientLevel().waitForChunksDownload();
}
}
}sourceSets {
testmodClient {
compileClasspath += main.compileClasspath + main.output + client.output
runtimeClasspath += main.runtimeClasspath + main.output + client.output
}
}
loom {
runs {
clientGametest {
client()
ideConfigGenerated true
name "Client Game Test"
source sourceSets.testmodClient
vmArg "-Dfabric.client.gametest"
}
}
}Then, ./gradlew runClientGametest will do everything successfully, then hang when the world is supposed to be disconnected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels