mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed tests that failed when running on lower end computers. Needed to add a couple of thread.sleeps
This commit is contained in:
@@ -24,7 +24,17 @@ public class ToggleSailSteps {
|
|||||||
@Given("^The game is running$")
|
@Given("^The game is running$")
|
||||||
public void the_game_is_running() throws Throwable {
|
public void the_game_is_running() throws Throwable {
|
||||||
mst = new MainServerThread();
|
mst = new MainServerThread();
|
||||||
|
try {
|
||||||
|
Thread.sleep(100);
|
||||||
|
} catch (InterruptedException ie) {
|
||||||
|
ie.printStackTrace();
|
||||||
|
}
|
||||||
client = new ClientToServerThread("localhost", 4942);
|
client = new ClientToServerThread("localhost", 4942);
|
||||||
|
try {
|
||||||
|
Thread.sleep(100);
|
||||||
|
} catch (InterruptedException ie) {
|
||||||
|
ie.printStackTrace();
|
||||||
|
}
|
||||||
GameState.setCurrentStage(GameStages.RACING);
|
GameState.setCurrentStage(GameStages.RACING);
|
||||||
Thread.sleep(200); // Sleep needed to help the threads all be up to speed with each other
|
Thread.sleep(200); // Sleep needed to help the threads all be up to speed with each other
|
||||||
ServerYacht yacht = (new ArrayList<>(GameState.getYachts().values())).get(0);
|
ServerYacht yacht = (new ArrayList<>(GameState.getYachts().values())).get(0);
|
||||||
@@ -50,5 +60,6 @@ public class ToggleSailSteps {
|
|||||||
Assert.assertFalse(yacht.getSailIn());
|
Assert.assertFalse(yacht.getSailIn());
|
||||||
}
|
}
|
||||||
mst.terminate();
|
mst.terminate();
|
||||||
|
client.setSocketToClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user