@@ -73,12 +73,12 @@ public void sync_IfDelay_ThenNoBuffer() {
7373 public void async_IfBotDelay_ThenClientBuffers () {
7474 SynchronizationEnvironment environment = new SynchronizationEnvironment ();
7575 environment .configuration
76- .withAsync (true )
77- .withMaxFrameDurationMs (10 )
78- .withAsyncFrameBufferCapacity (4 );
76+ .withAsync (true )
77+ .withMaxFrameDurationMs (100 )
78+ .withAsyncFrameBufferCapacity (4 );
7979
8080 environment .onFrame (1 , () -> {
81- sleepUnchecked (50 );
81+ sleepUnchecked (500 );
8282 assertEquals ("Bot should be observing an old frame" , 1 , environment .bwClient .getGame ().getFrameCount ());
8383 assertEquals ("Client should be as far ahead as the frame buffer allows" , 5 , environment .liveGameData ().getFrameCount ());
8484 assertEquals ("Bot should be behind the live game" , 4 , environment .bwClient .framesBehind ());
@@ -97,20 +97,20 @@ public void async_IfBotDelay_ThenClientBuffers() {
9797 public void async_IfBotDelay_ThenClientStalls () {
9898 SynchronizationEnvironment environment = new SynchronizationEnvironment ();
9999 environment .configuration
100- .withAsync (true )
101- .withMaxFrameDurationMs (50 )
102- .withAsyncFrameBufferCapacity (5 );
100+ .withAsync (true )
101+ .withMaxFrameDurationMs (200 )
102+ .withAsyncFrameBufferCapacity (5 );
103103
104104 environment .onFrame (1 , () -> {
105- sleepUnchecked (125 );
105+ sleepUnchecked (500 );
106106 assertEquals ("3: Bot should be observing an old frame" , 1 , environment .bwClient .getGame ().getFrameCount ());
107107 assertEquals ("3: Client should have progressed as slowly as possible" , 3 , environment .liveGameData ().getFrameCount ());
108108 assertEquals ("3: Bot should be behind the live game by as little as possible" , 2 , environment .bwClient .framesBehind ());
109- sleepUnchecked (50 );
109+ sleepUnchecked (200 );
110110 assertEquals ("4: Bot should be observing an old frame" , 1 , environment .bwClient .getGame ().getFrameCount ());
111111 assertEquals ("4: Client should have progressed as slowly as possible" , 4 , environment .liveGameData ().getFrameCount ());
112112 assertEquals ("4: Bot should be behind the live game by as little as possible" , 3 , environment .bwClient .framesBehind ());
113- sleepUnchecked (50 );
113+ sleepUnchecked (200 );
114114 assertEquals ("5: Bot should be observing an old frame" , 1 , environment .bwClient .getGame ().getFrameCount ());
115115 assertEquals ("5: Client should have progressed as slowly as possible" , 5 , environment .liveGameData ().getFrameCount ());
116116 assertEquals ("5: Bot should be behind the live game by as little as possible" , 4 , environment .bwClient .framesBehind ());
@@ -211,7 +211,7 @@ public void async_MeasurePerformance_FrameBufferSizeAndFramesBehind() {
211211 * Number of milliseconds of leeway to give in potentially noisy performance metrics.
212212 * Increase if tests are flaky due to variance in execution speed.
213213 */
214- private final static long MS_MARGIN = 10 ;
214+ private final static long MS_MARGIN = 20 ;
215215
216216 @ Test
217217 public void MeasurePerformance_BotResponse () {
0 commit comments