VirPong/human-pong — Issue #140: Test Case 4.5: Client 1 waiting for Client 2
Author: garrettdieckmann
Created: 2011-11-11 02:38:13+00:00
State: open
Labels: Server

4.5 Client 1 waiting for Client 2
Version:1.0
Description: This test will check whether Client 1 is able to wait for Client 2 to join.
Pre-conditions: The server is running Pong code, no clients are connected to the game
Post-conditions: Game begins when Client 2 joins the game
Scenario:
1. Client 1 navigates to the gamePlay webpage
2. Client code noti es server that they have connected
3. Server accepts client as a player 1
4. Server waits for another client to join
5. Client 2 connects to gamePlay webpage
6. Client code noti es server that they have connected
7. Server accepts client 2 as player 2
8. Game begins
Expected Results:
1. The game will wait for two players to join
2. The game will begin when two players join
Pass/Fail: Will commonly pass, sometimes fail.
Comments: If only Client 1 is connected, and Client 2 has not yet joined, Client 1 can crash the
server. If Client 1 presses any key (whether it is a movement key, or a any keyboard input) before
before Client 2 has connected, this will cause the server to crash, and not recover.
Code: The server crashes at line 152 of Server.js