@@ -91,7 +91,7 @@ void shouldRecoverFromDownedServer() throws Throwable
91
91
neo4j .forceRestartDb ();
92
92
93
93
// Then we accept a hump with failing sessions, but demand that failures stop as soon as the server is back up.
94
- sessionGrabber .assertSessionsAvailableWithin ( 60 );
94
+ sessionGrabber .assertSessionsAvailableWithin ( 120 );
95
95
}
96
96
97
97
@ Test
@@ -220,6 +220,7 @@ private class SessionGrabber implements Runnable
220
220
private volatile boolean sessionsAreAvailable = false ;
221
221
private volatile boolean run = true ;
222
222
private volatile Throwable lastExceptionFromDriver ;
223
+ private final int sleepTimeout = 100 ;
223
224
224
225
SessionGrabber ( Driver driver )
225
226
{
@@ -228,7 +229,7 @@ private class SessionGrabber implements Runnable
228
229
229
230
public void start ()
230
231
{
231
- new Thread (this ).start ();
232
+ new Thread ( this ).start ();
232
233
}
233
234
234
235
@ Override
@@ -251,6 +252,14 @@ public void run()
251
252
lastExceptionFromDriver = e ;
252
253
sessionsAreAvailable = false ;
253
254
}
255
+ try
256
+ {
257
+ Thread .sleep ( sleepTimeout );
258
+ }
259
+ catch ( InterruptedException e )
260
+ {
261
+ throw new RuntimeException ( e );
262
+ }
254
263
}
255
264
} finally
256
265
{
@@ -268,7 +277,7 @@ void assertSessionsAvailableWithin( int timeoutSeconds ) throws InterruptedExcep
268
277
// Success!
269
278
return ;
270
279
}
271
- Thread .sleep ( 100 );
280
+ Thread .sleep ( sleepTimeout );
272
281
}
273
282
274
283
// Failure - timeout :(
0 commit comments