rtista commented on pull request #3365: URL: https://github.com/apache/activemq-artemis/pull/3365#issuecomment-744021194
Hey guys, I believe I've found out the reason to why the test is failing but I'm going to need some help on deciding how to proceed from here. So, according to the Javadoc, the `AmqpFullyQualifiedNameTest.testQueueSpecial` test is expecting an exception to be raised when an "empty" address is passed in a FQQN, such as, "::q1". However, according to the implementation in this PR, "::q1" is no longer a valid FQQN since at least a single character needs to be present on each side of the separator. I've tracked the variations in the data flow to two places in the `activemq-artemis/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java` class in the `init()` method. 1. The first is an if statement checking a string for FQQN validation in the following lines: https://github.com/apache/activemq-artemis/blob/87e507aecb1103fdce28d37bb340362e4e14de91/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java#L997-L1003 * In the original version (before this PR modifications), the test would succeed as it would enter the first branch of the following if statement, assuming an empty string as the address and the queue name "q1": * With this PR modifications, the data flow enters the second branch (else) and populates the address variable with "::q1". 2. The second data flow variation is further in the same method where an evaluation to null of the queueNameToUse variable is tested: https://github.com/apache/activemq-artemis/blob/87e507aecb1103fdce28d37bb340362e4e14de91/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java#L1129-L1146 * Once again, in the original version (before this PR modifications), the data flow follows through the first branch as queueNameToUse != null is true and the `getMatchingQueue` method throws the expected exception as the data flow follows into the second throws statement: https://github.com/apache/activemq-artemis/blob/87e507aecb1103fdce28d37bb340362e4e14de91/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java#L1180-L1193 * However, after this PR modifications, the data flow follows into the else branch as queueNameToUse != null is false and so the exception is no longer thrown as I believe a single "::q1" ANYCAST queue is created. I am currently unsure as to how to proceed since I do not know if the behavior created by my modifications is expected in the AMQP protocol or not and would like to get some advice from you guys 😄 ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
