test: don't wait on game (when possible)
All checks were successful
Linux arm64 / Build (push) Successful in 38s
All checks were successful
Linux arm64 / Build (push) Successful in 38s
This commit is contained in:
@@ -30,6 +30,7 @@ public class PgnTest {
|
||||
commandExecutor.addListener(new GameAdapter() {
|
||||
@Override
|
||||
public void onGameEnd() {
|
||||
// does not work with this for some reason ...
|
||||
synchronized (game) {
|
||||
game.notifyAll();
|
||||
}
|
||||
@@ -85,17 +86,17 @@ public class PgnTest {
|
||||
|
||||
commandExecutor.close();
|
||||
|
||||
synchronized (game) {
|
||||
game.notifyAll();
|
||||
synchronized (this) {
|
||||
notifyAll();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
commandExecutor.executeCommand(new NewGameCommand());
|
||||
|
||||
synchronized (game) {
|
||||
synchronized (this) {
|
||||
try {
|
||||
game.wait();
|
||||
wait();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user