diff --git a/client-api/src/test/java/it/unibo/arces/wot/sepa/Sync.java b/client-api/src/test/java/it/unibo/arces/wot/sepa/Sync.java index f90bc1a9..b20af8fb 100644 --- a/client-api/src/test/java/it/unibo/arces/wot/sepa/Sync.java +++ b/client-api/src/test/java/it/unibo/arces/wot/sepa/Sync.java @@ -57,9 +57,7 @@ public synchronized void waitSubscribes(int total) { subscribesMutex.wait(); Logging.logger.trace("Thread id "+Thread.currentThread().getId()+ " awaken from waitSubscribes"); } catch (InterruptedException e) { - Logging.logger.trace("Thread id "+Thread.currentThread().getId()+ " interrupted in waitSubscribes"); - e.printStackTrace(); - break; + throw new RuntimeException(e.getCause()); } } } @@ -94,8 +92,7 @@ public synchronized void waitEvents(int total) { eventsMutex.wait(); Logging.logger.trace("Thread id "+Thread.currentThread().getId()+ " awaken from waitEvents"); } catch (InterruptedException e) { - Logging.logger.trace("Thread id "+Thread.currentThread().getId()+ " interrupted in waitEvents"); - break; + throw new RuntimeException(e.getCause()); } } } @@ -108,7 +105,7 @@ public synchronized void waitUnsubscribes(int total) { Logging.logger.trace("waitUnsubscribes"); unsubscribesMutex.wait(); } catch (InterruptedException e) { - break; + throw new RuntimeException(e.getCause()); } } }