Skip to content

Commit

Permalink
when the timeout is thrown show the thread name, as that is informati…
Browse files Browse the repository at this point in the history
…ve with stateful tests
  • Loading branch information
dcapwell committed Oct 3, 2024
1 parent fff495f commit eec4476
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion accord-core/src/test/java/accord/utils/Property.java
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ private <State, SystemUnderTest> void process(Command cmd, State state, SystemUn
cmd.process(state, sut);
return;
}
TimeoutUtils.runBlocking(stepTimeout, "Stateful Step " + id, () -> cmd.process(state, sut));
TimeoutUtils.runBlocking(stepTimeout, "Stateful Step " + id + ": " + cmd.detailed(state), () -> cmd.process(state, sut));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public static void runBlocking(Duration timeout, String threadName, FailingRunna
catch (TimeoutException e)
{
t.interrupt();
throw e;
TimeoutException e2 = new TimeoutException(threadName);
e2.setStackTrace(e.getStackTrace());
throw e2;
}
}
}

0 comments on commit eec4476

Please sign in to comment.