Commit Graph

5666 Commits

Author SHA1 Message Date
Howard Gao e15f3901e4 ARTEMIS-2013 Can't create durable subscriber to a composite topic
An OpenWire client can use a compound destination name of the form
"a,b,c..." and consume from, or subscribe to, multiple destinations.
Such a compound destination only works for topics when the subscriber
is non-durable. Attempting to create a durable subscription on a
compound address will end up with an error.

The cause is when creating durable subs to multiple topics/addresses
the broker uses the same name to create internal queues, which
causes duplicate name conflict.
2018-08-09 19:38:36 -04:00
Clebert Suconic d503bbb1ba This closes #2228 2018-08-09 19:36:23 -04:00
Justin Bertram 2d7c5322a7 ARTEMIS-2017 Eliminate LRUCache from SelectorParser
The LRUCache is not thread-safe and it's usage in SelectorParser could
cause growth beyond its configured max size. Instead of modifying the
LRUCache to be thread-safe or synchronizing access to it in
SelectorParser it should just be removed since it's not on a hot path.
2018-08-09 19:36:22 -04:00
Clebert Suconic 01800233c3 This closes #2233 2018-08-09 19:35:27 -04:00
Justin Bertram 1171f01b30 ARTEMIS-2020 Use prefixes when useJNDI=false in RA 2018-08-09 19:35:27 -04:00
Clebert Suconic 6bdfcd04f5 ARTEMIS-2021 setting flag before shutdown 2018-08-09 19:16:23 -04:00
Clebert Suconic 9c905a2b58 This closes #2234 2018-08-09 19:10:24 -04:00
Clebert Suconic 26208b76c7 ARTEMIS-2021 NetworkHealthCheck should only restart servers after net outages 2018-08-09 19:08:02 -04:00
Martyn Taylor d2063131f4 This closes #2232 2018-08-09 17:03:00 +01:00
Michael André Pearce 5d8079845e ARTEMIS-1482 Enhance test to ensure len check is done before byte[] init
Set the int to Integer.MAX_VALUE thus if the len check is not done before byte[] initialization the test would blow with an OOM.
2018-08-09 15:54:54 +01:00
Michael Andre Pearce c8fc7c64f3 This closes #2229 2018-08-09 13:37:56 +01:00
Christopher L. Shannon (cshannon) e915545278 ARTEMIS-2018 - Add bridge events to plugin API
Add callbacks to handle bridge events including beforeDeliverBridge,
afterDeliverBridge and afterAcknowledgeBridge
2018-08-09 13:37:56 +01:00
Clebert Suconic 24c13fa4e0 This closes #2221 2018-08-08 14:27:42 -04:00
Robbie Gemmell b0c65ba2dd ARTEMIS-1978: update to proton-j 0.27.3 to resolve sequencing issues
Adds test exposing broker behaviour from issues stemming from PROTON-1892 and PROTON-1901
2018-08-08 14:27:42 -04:00
Clebert Suconic 6534b6c0bb This closes #2223 2018-08-08 14:25:28 -04:00
Francesco Nigro 64cf5357e1 ARTEMIS-2015 PriorityLinkedListImpl::isEmpty is not thread-safe
PriorityLinkedListImpl::size access is changed to be safely
observable by a thread different from the one allowed to write
the list.
2018-08-08 14:25:28 -04:00
Clebert Suconic 70f5512622 This closes #2227 2018-08-08 14:23:54 -04:00
Martyn Taylor 985d1e1fcb ARTEMIS-1482 Add back check for SimpleString 2018-08-08 14:23:53 -04:00
Michael Andre Pearce 3d2eadfb8a This closes #2203 2018-08-08 17:37:58 +01:00
Francesco Nigro 8dd0e9472f ARTEMIS-1999 Broker uses 100% core's CPU time if msg grouping is used
The deliver loop won't give up trying to deliver messages when
back-pressure kicks in (credits and/or TCP) if msg grouping is used and
there are many consumers registered: this change will allow the loop
to exit by instructing the logic that the group consumer is the only
consumer to check.
2018-08-08 17:37:58 +01:00
Clebert Suconic 99469b1cff This closes #2224 2018-08-08 11:35:14 -04:00
Jiri Danek 8274703153 NO-JIRA improve assertions in QueueControlTest
This commit replaces assert{True,Equals} with more specific assertion methods.
2018-08-08 11:35:14 -04:00
Jiri Danek 05816fefab NO-JIRA fix unused parameter `durable` in AmqpClientTestSupport#sendMessages 2018-08-08 11:35:14 -04:00
Clebert Suconic 7480452bdd This closes #2226 2018-08-08 11:33:31 -04:00
Jiri Danek c1a191c547 ARTEMIS-2016 fix flaky test QueueControlTest#testRemoveAllWithPagingMode
Parameters going into Wait.waitFor were originally wrong, because
`durationMillis: 3, sleepMillis: 100` means you would test the condition
only once. This commit is changing the durationMillis from 3ms to 3s,
swapping the two numbers (duration 100ms, sleep 3ms) would also be reasonable, I think.

Next, Wait.assertEquals is here being used, instead of Assert.assertTrue.

I saw the test fail only once, and never was able to reproduce it again,
but I think this commit does improve the test and so it is worthwhile.

    java.lang.AssertionError
		at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.assertMetrics(QueueControlTest.java:2651)
	    at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.assertMessageMetrics(QueueControlTest.java:2615)
    	at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.testRemoveAllWithPagingMode(QueueControlTest.java:1554)
2018-08-08 11:33:31 -04:00
Clebert Suconic 9109fc1604 This closes #2225 2018-08-08 11:31:24 -04:00
Jiri Danek fed0426ff3 NO-JIRA fix flaky tests QueueControlTest#testResetMessagesExpired
The occasional assertion error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.

    java.lang.AssertionError:
    Expected :1
    Actual   :0
    [...]
    	at org.junit.Assert.assertEquals(Assert.java:542)
	    at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.testResetMessagesExpired(QueueControlTest.java:2370)
2018-08-08 11:31:23 -04:00
Jiri Danek c6521e0700 NO-JIRA fix flaky tests QueueControlTest#testChangeMessagePriority{,WithInvalidValue}
The occasional assertion error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.
2018-08-08 11:31:23 -04:00
Jiri Danek 23a30b6158 NO-JIRA fix flaky test QueueControlTest#testResetMessagesAdded
The occasional assertion error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.

I did not observe the timing issue on all asserts (only on the first
two), but there is no harm in replacing them all.

    java.lang.AssertionError:
    Expected :2
    Actual   :1
2018-08-08 11:31:23 -04:00
Jiri Danek fbb622ae69 NO-JIRA fix flaky test QueueControlTest#testListMessagesWithNullFilter
The below error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.

    java.lang.AssertionError:
    Expected :2
    Actual   :1
        [...]
    	at org.junit.Assert.assertEquals(Assert.java:542)
    	at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.testListMessagesWithNullFilter(QueueControlTest.java:804)
2018-08-08 11:31:23 -04:00
Jiri Danek 5c2f79ed45 NO-JIRA fix flaky test QueueControlTest#testListMessagesWithEmptyFilter
The below error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.

    java.lang.AssertionError:
    Expected :2
    Actual   :1
        [...]
        at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.testListMessagesWithEmptyFilter(QueueControlTest.java:827)
2018-08-08 11:31:23 -04:00
Justin Bertram 1b15f95554 ARTEMIS-2014 fix directory name in test 2018-08-08 09:55:40 -05:00
Clebert Suconic 44d4fea65c This closes #2222 2018-08-07 12:26:13 -04:00
Justin Bertram 0ae7d32532 ARTEMIS-2014 Treat inability to create directory for paging as critial 2018-08-07 11:09:46 -05:00
Clebert Suconic 2eb1a526f0 This closes #2216 2018-08-06 11:14:57 -04:00
Justin Bertram 7d14c06dd9 ARTEMIS-1947 fix tests 2018-08-06 11:14:57 -04:00
Clebert Suconic 869ad80a20 This closes #2214 2018-08-06 11:12:46 -04:00
Clebert Suconic b710df7844 ARTEMIS-2011 Fixing incompatibility of AddressSettings encode between versions
To fix this I added a retry on AddressSettings using code that's closer to the original version
2018-08-06 11:12:46 -04:00
Justin Bertram 3bb7df2de4 This closes #2215 2018-08-06 08:49:57 -05:00
Jeff Mesnil fd9aad202b [ARTEMIS-1947] Session metadata in session management operation
Fill the session's metadata in JSON properties instead of serializing it
as an opaque String.

JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1947
2018-08-06 14:11:40 +02:00
Clebert Suconic d13b42def7 This closes #2210 2018-08-03 14:19:48 -04:00
Shailendra Kumar Singh 3c5b050dff [ARTEMIS-2008]Add a CLI command to purge queue 2018-08-03 14:19:47 -04:00
Clebert Suconic ed643e479c This closes #2206 2018-08-03 14:18:34 -04:00
Christopher L. Shannon (cshannon) e629ac4538 ARTEMIS-2003 - Add bridge metrics
This commit adds support for tracking metrics for bridges for both
normal bridges and bridges that are part of a cluster. The two
statistics added in this commit are messages pending acknowledgement
and messages acknowledged but more can be added later.
2018-08-03 14:18:34 -04:00
Clebert Suconic f980c349a8 This closes #2207 2018-08-03 14:11:02 -04:00
Jiri Danek cb99b4a666 NO-JIRA fix flaky test HeuristicXATest.testRecoverHeuristicCommitWithRestart
The below error is prevented by adding Wait.assertEquals,
where Assert.assertEquals was used previously. Timeout is
set to small increments, since we rarely need to wait more
than 100 ms for the condition to become true.

java.lang.AssertionError: expected:<1> but was:<0>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:743)
	at org.junit.Assert.assertEquals(Assert.java:118)
	at org.junit.Assert.assertEquals(Assert.java:555)
	at org.junit.Assert.assertEquals(Assert.java:542)
	at org.apache.activemq.artemis.tests.integration.client.HeuristicXATest.doRecoverHeuristicCompletedTxWithRestart(HeuristicXATest.java:306)
	at org.apache.activemq.artemis.tests.integration.client.HeuristicXATest.testRecoverHeuristicCommitWithRestart(HeuristicXATest.java:251)
2018-08-03 14:11:02 -04:00
Clebert Suconic a92324be35 NO-JIRA Fixing MultiThreadAsynchronousFileTest on limited servers
This test was initializing a libaio of 21K, that would fail on limited servers.
This is decreasing maxIO so it would requires less resources to run it.
2018-08-03 13:09:41 -04:00
Clebert Suconic a6ecdcb44f This closes #2212 2018-08-03 09:54:41 -04:00
Michael André Pearce 825081cfc0 ARTEMIS-856 Fixing ScaleDownTest
Don't increment the pos if redistributor. causes pos to be > size thus index out of bounds when getting the consumer on next loop.
2018-08-03 10:48:59 +01:00
Clebert Suconic 77989c3763 NO-JIRA avoiding a NPE if the server is stopped 2018-08-02 10:57:17 -04:00