[ 
https://issues.apache.org/jira/browse/ARTEMIS-2802?focusedWorklogId=556500&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-556500
 ]

ASF GitHub Bot logged work on ARTEMIS-2802:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Feb/21 18:20
            Start Date: 23/Feb/21 18:20
    Worklog Time Spent: 10m 
      Work Description: cshannon commented on pull request #3465:
URL: https://github.com/apache/activemq-artemis/pull/3465#issuecomment-784410891


   @jbertram - I took one more quick look at writing a test because I realized 
@michaelandrepearce uploaded some modified test files that work with OpenWire. 
After looking at it i'm not really sure we can write a good test.
   
   I ran those test files and I do see the log but as pointed out everything 
still passes. The reason why those tests pass are because when the exception 
occurs inside of FilterImpl it just returns false which is what the proper 
result should be anyways. See: 
https://github.com/apache/activemq-artemis/blob/36a771150b3ce7a0d889f7df3b7c7a6cd37769f7/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java#L128
   
   So, I'm not really sure of a way (at least with integration tests) to write 
a test to verify the fix as the correct thing already happens either way thanks 
to the error handling in the exception block. The only thing I can think of 
would be to maybe mock some stuff and add a test to try and verify that the 
createRemoteConsumer method checks for null properly before passing to the 
metaDataFilter but that would probably require re-working the FederatedQueue 
class to be able to get access to test as everything is private and non-static 
now.


----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 556500)
    Time Spent: 0.5h  (was: 20m)

> Federation not working when clients connect using OpenWire protocol
> -------------------------------------------------------------------
>
>                 Key: ARTEMIS-2802
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2802
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: OpenWire
>    Affects Versions: 2.13.0
>            Reporter: jerhat
>            Assignee: Christopher L. Shannon
>            Priority: Minor
>             Fix For: 2.18.0
>
>         Attachments: FederatedQueueTest.java, FederatedTestBase.java
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Reproducible by switching from:
>  
> {code:java}
> import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;{code}
>  
> to:
> {code:java}
> import org.apache.activemq.ActiveMQConnectionFactory;{code}
>  
> and adding dependency:
> {code:java}
> <dependency>
>   <groupId>org.apache.activemq</groupId>
>   <artifactId>activemq-client</artifactId>
>   <version>${activemq5-version}</version>
> </dependency>{code}
> to *federated-queue* example.
> Test will fail, below error is logged:
> {{ERROR [org.apache.activemq.artemis.core.server] AMQ224006: Invalid filter: 
> hyphenated_props:federation-name IS NOT NULL}}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to