ARTEMIS-3834 Include paged messages when running "Send messages to DLA"
I'm running the whole test suite on a CI box I have access and if all good will merge this...
thanks.
@AntonRoskvist do you mind fixing QueueControlUsingCoreTest.testSendToDLAIncludesPagedMessages ?
@clebertsuconic Sure no problem, what is the issue you are seeing?
QueueControlUsingCoreTest extends the test you wrote to try management through core messages there's a proxy, and there's a failure because:
Error Message class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap')
Basically the proxy method you wrote seems wrong.
if you can't fix it.. I will figure out later...
You should be able to run the test through Idea... what makes my workflow simple...
if you don't have your environment set to run these tests... just let me know if you wouldn't be able to.
Sure no problem, I'll give that a try right away
@clebertsuconic I fixed it so the test passes but I'm not 100% sure this is the correct fix... to be honest I cannot really figure out why it receives a Long as response instead of the expected Integer... stepping through the code with a debugger I can see that the actual return value from "QueueImpl#sendMessagesToDeadLetterAddress()" is an int just like before the change but I guess it gets cast at some point along the way?
Travis CI failed at: testSoakHornetQ(org.apache.activemq.artemis.tests.compatibility.HornetQSoakTest) but only for jdk11... I'm assuming that's unrelated for now
The real way to fix QueueControlUsingCoreTest is just to tell invokeOperation to cast it to an Integer.class, e.g.:
@Override
public int sendMessagesToDeadLetterAddress(final String filterStr) throws Exception {
return (Integer) proxy.invokeOperation(Integer.class, "sendMessagesToDeadLetterAddress", filterStr);
}
That said, I'm concerned that this introduces an inconsistency with sendMessageToDeadLetterAddress(long) which doesn't include paged messages. I think either both of these methods should work on paged messages or neither of them should.
Thoughts?
I agree, that makes sense. I will fix both the test and also make sure that the sendMessageToDeadLetterAddress(long) includes paged messages. Thanks
@jbertram @clebertsuconic Hope this is looking better, otherwise just let med know.
Don't really know why the build test for JDK11 failed TBH, it was successful on the same job in my repo and locally...
@AntonRoskvist I have authorization set to re-run failing jobs. I will re-run it as soon as the current workflow finishes. Thanks!