Skip to content

Commit 58f6cfc

Browse files
CopilotDanySK
andcommitted
test(incarnation-sapere): handle InterruptedException in task.get() explicitly
Agent-Logs-Url: https://github.com/AlchemistSimulator/Alchemist/sessions/6651c551-7d20-4a2c-aebc-a2f43f4054f8 Co-authored-by: DanySK <1991673+DanySK@users.noreply.github.com>
1 parent edee5ff commit 58f6cfc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

alchemist-incarnation-sapere/src/test/java/it/unibo/alchemist/model/sapere/nodes/LsaNodeConcurrencyTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ void testConcurrentGetContentsAndModification() throws InterruptedException {
9696
for (final Future<?> task : tasks) {
9797
try {
9898
task.get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
99+
} catch (final InterruptedException e) {
100+
Thread.currentThread().interrupt();
101+
throw new AssertionError("Test interrupted while waiting for task", e);
99102
} catch (final ExecutionException e) {
100103
throw new AssertionError("Task failed with exception", e.getCause());
101104
} catch (final TimeoutException e) {

0 commit comments

Comments
 (0)