@@ -115,6 +115,7 @@ void tearDown() {
115115 @ ParameterizedTest
116116 @ MethodSource ("sleepTimes" )
117117 public void shutdownDuringValidation (int sleepMillis ) {
118+ System .err .println (Thread .currentThread () + " shutdownDuringValidation with sleepMillis=" + sleepMillis );
118119 try {
119120// clear interrupted flag
120121 Thread .interrupted ();
@@ -156,15 +157,15 @@ public void shutdownDuringValidation(int sleepMillis) {
156157 }
157158 } catch (Exception e ) {
158159 if (e instanceof RepositoryException && causedByInterruptedException (e )) {
159- System .out .println (e );
160+ System .err .println (e );
160161 return ;
161162 }
162163 if (e instanceof RepositoryException && e .getCause () instanceof InterruptedSailException ) {
163- System .out .println (e );
164+ System .err .println (e );
164165 return ;
165166 }
166167 if (e .toString ().contains ("closed" )) {
167- System .out .println (e );
168+ System .err .println (e );
168169 return ;
169170 }
170171 throw e ;
@@ -174,6 +175,8 @@ public void shutdownDuringValidation(int sleepMillis) {
174175 @ ParameterizedTest
175176 @ MethodSource ("sleepTimes" )
176177 public void shutdownDuringValidationTransactional (int sleepMillis ) {
178+ System .err .println (
179+ Thread .currentThread () + " shutdownDuringValidationTransactional with sleepMillis=" + sleepMillis );
177180 try {
178181// clear interrupted flag
179182 Thread .interrupted ();
@@ -221,15 +224,15 @@ public void shutdownDuringValidationTransactional(int sleepMillis) {
221224 }
222225 } catch (Exception e ) {
223226 if (e instanceof RepositoryException && causedByInterruptedException (e )) {
224- System .out .println (e );
227+ System .err .println (e );
225228 return ;
226229 }
227230 if (e instanceof RepositoryException && e .getCause () instanceof InterruptedSailException ) {
228- System .out .println (e );
231+ System .err .println (e );
229232 return ;
230233 }
231234 if (e .toString ().contains ("closed" )) {
232- System .out .println (e );
235+ System .err .println (e );
233236 return ;
234237 }
235238 throw e ;
@@ -239,6 +242,7 @@ public void shutdownDuringValidationTransactional(int sleepMillis) {
239242 @ ParameterizedTest
240243 @ MethodSource ("sleepTimes" )
241244 public void shutdownDuringValidationFailure (int sleepMillis ) {
245+ System .err .println (Thread .currentThread () + " shutdownDuringValidationFailure with sleepMillis=" + sleepMillis );
242246 try {
243247
244248// clear interrupted flag
@@ -280,15 +284,15 @@ public void shutdownDuringValidationFailure(int sleepMillis) {
280284 }
281285 } catch (Exception e ) {
282286 if (e instanceof RepositoryException && causedByInterruptedException (e )) {
283- System .out .println (e );
287+ System .err .println (e );
284288 return ;
285289 }
286290 if (e instanceof RepositoryException && e .getCause () instanceof InterruptedSailException ) {
287- System .out .println (e );
291+ System .err .println (e );
288292 return ;
289293 }
290294 if (e .toString ().contains ("closed" )) {
291- System .out .println (e );
295+ System .err .println (e );
292296 return ;
293297 }
294298 throw e ;
@@ -298,6 +302,8 @@ public void shutdownDuringValidationFailure(int sleepMillis) {
298302 @ ParameterizedTest
299303 @ MethodSource ("sleepTimes" )
300304 public void shutdownDuringValidationFailureNonParallel (int sleepMillis ) {
305+ System .err .println (
306+ Thread .currentThread () + " shutdownDuringValidationFailureNonParallel with sleepMillis=" + sleepMillis );
301307 try {
302308// clear interrupted flag
303309 Thread .interrupted ();
@@ -339,15 +345,15 @@ public void shutdownDuringValidationFailureNonParallel(int sleepMillis) {
339345 }
340346 } catch (Exception e ) {
341347 if (e instanceof RepositoryException && causedByInterruptedException (e )) {
342- System .out .println (e );
348+ System .err .println (e );
343349 return ;
344350 }
345351 if (e instanceof RepositoryException && e .getCause () instanceof InterruptedSailException ) {
346- System .out .println (e );
352+ System .err .println (e );
347353 return ;
348354 }
349355 if (e .toString ().contains ("closed" )) {
350- System .out .println (e );
356+ System .err .println (e );
351357 return ;
352358 }
353359
@@ -358,6 +364,8 @@ public void shutdownDuringValidationFailureNonParallel(int sleepMillis) {
358364 @ ParameterizedTest
359365 @ MethodSource ("sleepTimes" )
360366 public void shutdownDuringValidationTransactionalNonParallel (int sleepMillis ) {
367+ System .err .println (Thread .currentThread ()
368+ + " shutdownDuringValidationTransactionalNonParallel with sleepMillis=" + sleepMillis );
361369 try {
362370 // clear interrupted flag
363371 boolean interrupted = Thread .interrupted ();
@@ -378,7 +386,7 @@ public void shutdownDuringValidationTransactionalNonParallel(int sleepMillis) {
378386
379387 commitAndExpect (connection , EXPECTED_REPOSITORY_SIZE + 1 , 1 );
380388 } catch (RepositoryException | SailException e ) {
381- System .out .println (e );
389+ System .err .println (e );
382390 if (e instanceof InterruptedSailException ) {
383391 // ignore this exception
384392 return ;
@@ -413,15 +421,15 @@ public void shutdownDuringValidationTransactionalNonParallel(int sleepMillis) {
413421 }
414422 } catch (Exception e ) {
415423 if (e instanceof RepositoryException && causedByInterruptedException (e )) {
416- System .out .println (e );
424+ System .err .println (e );
417425 return ;
418426 }
419427 if (e instanceof RepositoryException && e .getCause () instanceof InterruptedSailException ) {
420- System .out .println (e );
428+ System .err .println (e );
421429 return ;
422430 }
423431 if (e .toString ().contains ("closed" )) {
424- System .out .println (e );
432+ System .err .println (e );
425433 return ;
426434 }
427435 throw e ;
@@ -430,6 +438,7 @@ public void shutdownDuringValidationTransactionalNonParallel(int sleepMillis) {
430438
431439 @ Test
432440 void nestedInterruptedExceptionShouldBeDetected () {
441+ System .err .println (Thread .currentThread () + " nestedInterruptedExceptionShouldBeDetected" );
433442 InterruptedException interruptedException = new InterruptedException ("nested" );
434443 SailException sailException = new SailException ("wrapper" , new SailException ("inner" , interruptedException ));
435444 RepositoryException repositoryException = new RepositoryException ("top" , sailException );
@@ -473,7 +482,7 @@ private static void commitAndExpect(SailRepositoryConnection connection, long ex
473482 throw e ;
474483 }
475484 } catch (RepositoryException ignored ) {
476- System .out .println (ignored .getMessage ());
485+ System .err .println (ignored .getMessage ());
477486 try {
478487 connection .rollback ();
479488 } catch (Exception e ) {
0 commit comments