The changes in #766 removed synchronized methods from Game.class. This allowed tests on Game.class to run concurrently. This caused about ~20% of tests to fail.
Before #766, an attempt was made to prevent tests from failing by using synchronized methods in Game.class.
However, this would still have allowed tests to fail randomly. Lets say Thread 1 and Thread 2 both wanted to do tests on Game.class at the same time.
Ex:
Thread 1 wants to call Game.init() which was synchronized.
Because it was synchronized, Thread 1 acquires lock to Game.class
Thread 2 wants to call Game.init(), but Game.class is locked, so it waits.
Thread 1 calls Game.init()
Thread 1 has finished calling Game.init, so it releases the lock to Game.class
Thread 2 is free to call Game.init()
Game gets initialized twice without being terminated so test fails
The proper way to do this is to prevent other tests that use the Game class from running until the current one has finished. GameTestSuite does that.
The changes in #766 removed synchronized methods from Game.class. This allowed tests on Game.class to run concurrently. This caused about ~20% of tests to fail.
Before #766, an attempt was made to prevent tests from failing by using synchronized methods in Game.class.
However, this would still have allowed tests to fail randomly. Lets say Thread 1 and Thread 2 both wanted to do tests on Game.class at the same time.
Ex:
The proper way to do this is to prevent other tests that use the Game class from running until the current one has finished. GameTestSuite does that.