Skip to content

Commit

Permalink
test(client-api): correctly re-throw if interrupted
Browse files Browse the repository at this point in the history
  • Loading branch information
relu91 committed Jan 24, 2024
1 parent 85af752 commit a96bb9f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions client-api/src/test/java/it/unibo/arces/wot/sepa/Sync.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}
Expand Down Expand Up @@ -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());
}
}
}
Expand All @@ -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());
}
}
}
Expand Down

0 comments on commit a96bb9f

Please sign in to comment.