Copilot commented on code in PR #2011:
URL: https://github.com/apache/maven-resolver/pull/2011#discussion_r3641845233
##########
maven-resolver-api/src/test/java/org/eclipse/aether/DefaultRepositoryCacheTest.java:
##########
@@ -79,7 +79,6 @@ public void run() {
assertEquals(Boolean.TRUE, get(key));
} catch (Throwable t) {
error.compareAndSet(null, t);
- t.printStackTrace();
}
Review Comment:
With printStackTrace() removed, a failure in a worker thread will now only
show `Throwable.toString()` via the final `assertNull(...)`, losing the
original stack trace and making concurrency failures harder to diagnose.
Consider rethrowing the captured Throwable on the main test thread after
joining, so JUnit prints the full stack trace without using printStackTrace().
##########
maven-resolver-api/src/test/java/org/eclipse/aether/DefaultSessionDataTest.java:
##########
@@ -115,7 +115,6 @@ public void run() {
assertEquals(Boolean.TRUE, get(key));
} catch (Throwable t) {
error.compareAndSet(null, t);
- t.printStackTrace();
}
Review Comment:
With printStackTrace() removed, a failure in a worker thread will now only
show `Throwable.toString()` via the final `assertNull(...)`, losing the
original stack trace and making concurrency failures much harder to diagnose.
Consider rethrowing the captured Throwable on the main test thread after
joining, so JUnit prints the full stack trace without using printStackTrace().
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]