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


The following commit(s) were added to refs/heads/main by this push:
     new 2e7e820  PROTON-2383 Improve the AMQP performative logging appearance
2e7e820 is described below

commit 2e7e820274d80eabf6427753fc3260cb796563ac
Author: Timothy Bish <tabish...@gmail.com>
AuthorDate: Thu May 20 17:31:36 2021 -0400

    PROTON-2383 Improve the AMQP performative logging appearance
    
    Improve how AMQP performatives are stringified to make their values in
    logs easier to decipher.
---
 .../java/org/apache/qpid/protonj2/test/driver/AMQPTestDriver.java     | 2 --
 .../test/driver/codec/transport/PerformativeDescribedType.java        | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

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 eb48d66..bd95058 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
@@ -311,8 +311,6 @@ public class AMQPTestDriver implements Consumer<ByteBuffer> 
{
         synchronized (script) {
             final ScriptedElement scriptEntry = script.poll();
             if (scriptEntry == null) {
-                // TODO - Need to ensure a readable error by converting the 
codec type to a true performative type when
-                //        logging what happened here.
                 signalFailure(new AssertionError("Received performative[" + 
amqp + "] when not expecting any input."));
             }
 
diff --git 
a/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/codec/transport/PerformativeDescribedType.java
 
b/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/codec/transport/PerformativeDescribedType.java
index fd61af1..f43d5e9 100644
--- 
a/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/codec/transport/PerformativeDescribedType.java
+++ 
b/protonj2-test-driver/src/main/java/org/apache/qpid/protonj2/test/driver/codec/transport/PerformativeDescribedType.java
@@ -90,4 +90,8 @@ public abstract class PerformativeDescribedType extends 
ListDescribedType {
 
     public abstract <E> void invoke(PerformativeHandler<E> handler, ByteBuf 
payload, int channel, E context);
 
+    @Override
+    public String toString() {
+        return getPerformativeType() + " " + getList();
+    }
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to