Skip to content

Commit

Permalink
Use non AI client in testOnlyOneInvite
Browse files Browse the repository at this point in the history
The AIs immediately accept invitations. The test still fails, but it
seems to work when I test manually.
  • Loading branch information
jacwah committed Sep 3, 2015
1 parent fae3972 commit cc81043
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -222,13 +222,16 @@ public void testPlayAny() throws InterruptedException, IOException {

@Test(timeout = 10000)
public void testOnlyOneInvite() throws IOException, InterruptedException {
client1.send(new StartGameRequest(2, getTestMod()));
TestClient client2 = createTestClient();
int client2id = userId + 1;

client1.send(new StartGameRequest(client2id, getTestMod()));
NewGameMessage gameMessage = client1.await(NewGameMessage.class);
assertEquals(1, gameMessage.getGameId());
client1.await(PlayerConfigMessage.class);
client1.await(ChatMessage.class);

client1.send(new StartGameRequest(2, getTestMod()));
client1.send(new StartGameRequest(client2id, getTestMod()));
client1.await(ServerErrorMessage.class);
}

Expand Down

0 comments on commit cc81043

Please sign in to comment.