You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2025/01/21 17:41:54 UTC
(qpid-protonj2) 03/03: PROTON-2867 Wrap the driver assertions in a thread local error
This is an automated email from the ASF dual-hosted git repository.
tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-protonj2.git
commit 0108c9d99a116f3108bbe1ed57c3b702be5b377e
Author: Timothy Bish <ta...@gmail.com>
AuthorDate: Tue Jan 21 12:25:36 2025 -0500
PROTON-2867 Wrap the driver assertions in a thread local error
Ensure the error thrown shows the actual location of the test driver
method that throws the assertion making it easier to see where in the
unit tests the assertion comes from.
---
.../main/java/org/apache/qpid/protonj2/test/driver/AMQPTestDriver.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/AMQPTestDriver.java b/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/AMQPTestDriver.java
index 91a4e53a..e67d0290 100644
--- a/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/AMQPTestDriver.java
+++ b/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/AMQPTestDriver.java
@@ -850,7 +850,7 @@ public class AMQPTestDriver implements Consumer<ByteBuffer> {
private void checkFailed() {
if (failureCause != null) {
- throw failureCause;
+ throw new AssertionError(failureCause.getMessage(), failureCause);
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org