Commit Graph

1339 Commits

Author SHA1 Message Date
Martyn Taylor c6e5163a51 ARTEMIS-1511 Enable WebSocket Transport in STOMP test client 2017-11-13 16:55:47 -05:00
Martyn Taylor 5211afdf86 ARTEMIS-1511 Refactor AMQP Transport for use with other test clients 2017-11-13 16:55:47 -05:00
Clebert Suconic 63b156e290 ARTEMIS-1495 Test Improvements
Server.stop is currently waiting completions on Sessions just because of test cases.

With the recent changes made into the Executors this is not needed any longer
2017-11-13 16:46:32 -05:00
Clebert Suconic 91db08072b ARTEMIS-1495 Fixing In Handler executor and added benchmark to measure impact of changes 2017-11-09 11:58:36 -05:00
Clebert Suconic 2e6176a693 ARTEMIS-1495 Removing flushes from codebase
Instead of flushing we just need to make sure there are no more calls into
page executors as we stop the PageManager.

This will avoid any possible starvations or deadlocks here.
2017-11-09 11:58:36 -05:00
Francesco Nigro 8bf879f156 ARTEMIS-1495 Test simulating a dead lock on queue auto create under stress 2017-11-09 11:58:36 -05:00
Francesco Nigro 8e8a6f0faf ARTEMIS-1509 Add support for JdbcNodeManager into the NettyFailoverTest 2017-11-08 14:52:57 +01:00
Francesco Nigro 3950169c21 ARTEMIS-1471 Needs Bounds Checking on writes for MappedSequentialFile
The MappedSequentialFile relies on the assumption that any writers
won't exceed the maximum capacity of the file, leaving the JVM to crash otherwise.
This commit adds proper bounds checking on write operations (and position changes too)
in order to provide recoverable effects if such scenario should occour.
In addition are provided minor fixes on Mapped and Nio SequentialFile::fill behaviour
to match the original contract.
2017-11-06 13:52:57 -05:00
Clebert Suconic 559a704818 ARTEMIS-1416 Fixing testsuite 2017-11-03 18:27:42 -04:00
Howard Gao ec13ed6df0 ARTEMIS-1416 Fix regressions in Joram tests
This closes #1621
2017-11-03 18:26:03 -04:00
Howard Gao f3ace6afd7 ARTEMIS-1416 Queue is not autocreated if address already exists
- Fix on core and amqp.
- Add test to verify amqp's current large message behavior.
- Add test to openwire also just to verify.
2017-11-03 18:25:23 -04:00
Clebert Suconic ea5967b09b NO-JIRA Fixing typo
I changed the assertion by mistake on 75dc271cdb
2017-11-03 13:18:09 -04:00
Stanislav Knot a5c0c024fa ARTEMIS-1486 added JMS client test 2017-11-03 10:53:05 -04:00
Justin Bertram 096d98407f ARTEMIS-1492 obfuscate passwords in acceptorControl 2017-11-02 20:46:26 -04:00
Clebert Suconic 75dc271cdb NO-JIRA Small refactoring on Wait
- Added Wait.assert methods, what would make it easier to assert on future conditions
- Moved Wait to artemis-junit, we are now using that module on the testsuite
2017-11-02 09:37:31 -04:00
Clebert Suconic 7f4a79b0c6 NO-JIRA Fixing intermittent test failures 2017-11-02 09:37:31 -04:00
Stanislav Knot 61ce7a7454 ARTEMIS-1486 Core client should be notified if consumer is closed on broker side 2017-11-02 11:19:35 +00:00
Justin Bertram 8703d9d51d [maven-release-plugin] prepare for next development iteration 2017-11-01 00:38:57 -05:00
Justin Bertram ec63189a0a [maven-release-plugin] prepare release 2.4.0 2017-11-01 00:38:56 -05:00
Justin Bertram a44b9d5edf [maven-release-plugin] prepare for next development iteration 2017-10-31 12:09:43 -05:00
Justin Bertram 34a7431d1b [maven-release-plugin] prepare release 2.4.0 2017-10-31 12:07:55 -05:00
Clebert Suconic 9eb780cbd1 ARTEMIS-1490 Race on address delete 2017-10-31 08:37:40 -05:00
Clebert Suconic f8a0eec2cf ARTEMIS-1489 Adjusting timeouts on test
The Critical analyzer is supposed to catch Deadlocks, and such
can only be resolved by killing the VM.

This test is using shutdown as it would be a bit more complex to
handle Byteman to then halt the VM. This will validate the
CriticalAnalyzer is capturing the event, and in such it would halt the VM.
2017-10-31 08:33:44 -05:00
Clebert Suconic 2bf690e21b ARTEMIS-1489 Adding Timed Buffer into Critical Analyzer 2017-10-31 08:33:44 -05:00
Martyn Taylor 5a476a189d ARTEMIS-1489 Add test for TimedBuffer Critical Analyser 2017-10-31 08:33:44 -05:00
Justin Bertram c93a250635 ARTEMIS-1473 fix default user/pass system props 2017-10-25 14:56:09 -05:00
Justin Bertram ac73f38d3d NO-JIRA fix timing issue in test 2017-10-25 12:45:48 -05:00
Chris Burlinchon 06dab31fd0 ARTEMIS-1479 Fix set validated user in large messages 2017-10-25 11:44:14 -04:00
Stanislav Knot 6faffd690e ARTEMIS-1420 enforce timeout on network client handshake 2017-10-24 14:28:23 -05:00
Christopher L. Shannon (cshannon) b386c7c5ae ARTEMIS-1469 - Add support for trusting any client certificate
Added a new trustAll flag which will support trusting any client
keystore when doing testing against a broker.  This setting should not
be used in production and is strictly for testing.
2017-10-19 08:57:10 -05:00
Michael André Pearce c1fcadb706 ARTEMIS-1464 Fix Core to AMQP conversion BytesMessage corrupts bytes
Extend test cases in MessageTypesTest to cover Core to AMQP combinations for all JMSTypeTests
Fix ServerJMSBytesMessage to correctly return bodyLength
Remove unused/dead code
2017-10-19 13:11:39 +01:00
Clebert Suconic fdcae9d32a ARTEMIS-450 Fixing deadlock over lots of rollbacks and Queue.addHead 2017-10-18 12:21:47 -04:00
Justin Bertram eee72a61d1 ARTEMIS-1456 use queue name when null address on createQueue 2017-10-17 10:03:33 +01:00
Howard Gao 105d8c3388 ARTEMIS-1366 Hide Advisory Address from Management Console
Openwire consumer is listed twice below "consumers" tab.
First it shows correctly the requested queue consume.
Second it shows consumer from multicast queue ActiveMQ.Advisory.
The second one is internal and should be hidden.
2017-10-16 16:51:54 -05:00
Andy Taylor 62a2b14dd0 ARTEMIS-1463 - add role based authentication to the JMX objects
This is done by creating a guard and using JAAS to check for access to mbean objects and their methods.

NB this also implements https://issues.apache.org/jira/browse/ARTEMIS-534

https://issues.apache.org/jira/browse/ARTEMIS-1463
2017-10-16 15:39:38 +01:00
Howard Gao 180703da6c NO-JIRA Adding Openwire basic divert tests
Adding 2 tests that showing how openwire clients
interact with core Divert.
2017-10-11 20:58:14 +08:00
Clebert Suconic ea89833204 ARTEMIS-1446 Use Contructor on TransformerConfiguration 2017-10-10 15:17:31 -04:00
Clebert Suconic 3b24a3b74c NO-JIRA Fixing broken test 2017-10-10 13:34:38 -04:00
Howard Gao 312d53d5ab ARTEMIS-1227 Internal properties not removed from messages
In a cluster if a node is shut down (or crashed) when a
message is being routed to a remote binding, a internal
property may be added to the message and persisted. The
name of the property is like _AMQ_ROUTE_TOsf.my-cluster*.
if the node starts back, it will load and reroute this message
and if it goes to a local consumer, this property won't
get removed and goes to the client.

The fix is to remove this internal property before it
is sent to any client.
2017-10-10 09:15:45 +08:00
Clebert Suconic 964cbcad07 ARTEMIS-1446 fixing test 2017-10-09 20:25:05 -04:00
Michael Andre Pearce 4db8cd54ca ARTEMIS-1446 - Support Transformer configuration by properties
Update Tranformer to be able to handle initiation via propertiers (map<string, string>)
Update Configuration to have more specific transfromer configuration type, and to take properties.
Support back compatibility.
Add AddHeadersTransformer which is a main use case, and can act as example also.
Update Control's to expose new property configuration
Add test cases
Update examples for new transformer config style
2017-10-09 17:29:10 -04:00
Clebert Suconic d190b611be ARTEMIS-1452 Improvements to IO parameters and options
- it is now possible to disable the TimedBuffer
- this is increasing the default on libaio maxAIO to 4k
- The Auto Tuning on the journal will use asynchronous writes to simulate what would happen on faster disks
- If you set datasync=false on the CLI, the system will suggest mapped and disable the buffer timeout

This closes #1436

This commit superseeds #1436 since it's now disabling the timed buffer through the CLI
2017-10-09 14:32:04 -04:00
Clebert Suconic 1d5fe2862a ARTEMIS-1444 Fixing byte buffer conversion
I'm also using a lower size on message, to speed up the new test.

(100M may be a lot on some CIs)
2017-10-09 12:50:38 -04:00
Martyn Taylor 988c91557d ARTEMIS-1444 Support Messages > JournalBufferSize in all Protocols 2017-10-09 12:50:38 -04:00
Robert Godfrey cc8a0cb90e ARTEMIS-1454: Support SASL in outgoing AMQP
Update ProtonHandler to allow for both client and server side SASL
and other related changes to allow for setting of client side mechanism
2017-10-09 10:05:35 +02:00
Timothy Bish 6d94997aa8 ARTEMIS-1314 Fixing issues with JMS selectors on AMQP
Allows for JMS selectors on JMSCorrelationID as well as JMSXGroupID
and JMSXUserID along with some fixes to avoid an NPE case and fixes
to the conversion of AMQP MessageID and CorrelationID values when
doing cross protocol mappings.  Adds new tests to cover more cases
of using the JMS selector with Qpid JMS and the AMQP test client.
2017-10-06 18:40:06 -04:00
Jeff Mesnil 5401ec383f [ARTEMIS-1450] Support InitialMessagePacketSize on JMS ConnectionFactoryConfiguration
JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1450
2017-10-06 18:39:27 -04:00
Justin Bertram 03d56d2cf5 ARTEMIS-1445 fix auto-delete for AMQP and OpenWire 2017-10-05 14:08:52 -05:00
Clebert Suconic 02b305b02a ARTEMIS-1352 Fixing test on Auto created address 2017-10-03 11:59:42 -04:00
Clebert Suconic aa3e8941d1 ARTEMIS-1442 Shutdown server if can't move file on journal 2017-09-29 11:35:47 -04:00
Clebert Suconic 178d403117 NO-JIRA Adding CriticalAnalyzer test on HALT 2017-09-29 11:35:47 -04:00
Clebert Suconic 1b0fc06196 ARTEMIS-1440 ForceFailover to be asynchronous and allow management 2017-09-29 09:34:30 -04:00
Justin Bertram d1cd1e71a1 ARTEMIS-1352 auto-create MULTICAST queue when AMQP client sends to topic 2017-09-28 21:40:18 -04:00
Michael Andre Pearce e9eaa7daf6 ARTEMIS-1422 Fix match change to support wildcard config 2017-09-25 11:34:34 -04:00
Clebert Suconic 533797fbc4 ARTEMIS-1218 Fixing checkstyle 2017-09-25 11:10:38 -04:00
Justin Bertram 956c4c6493 NO-JIRA use lambdas in tests for readability 2017-09-25 11:00:56 -04:00
Justin Bertram dac625179a ARTEMIS-1218 implement MQTT link stealing 2017-09-25 11:00:56 -04:00
Jens Reimann 144dbadcb5 ARTEMIS-1391 embedding 2 MQTT brokers is broken 2017-09-25 11:00:56 -04:00
Jiri Danek 4d126adedb ARTEMIS-1398 NPE on null pwd from MQTT client 2017-09-25 10:55:11 -04:00
Pat Fox 50fcd48e28 ARTEMIS-1433 adding AddressMemoryUsage() and AddressMemoryUsagePercentage() to ActiveMQServerControl 2017-09-25 10:37:16 -04:00
Robbie Gemmell 1a077348e2 ARTEMIS-1434: update handling of tick deadline values
- account for potential to be negative due to using nanoTime derived values
- add some other edge case protections to avoid task ceasing in error
2017-09-22 16:33:21 +01:00
Howard Gao f84d26ebb2 ARTEMIS-1424 Openwire not work with different tightEncoding options
If message senders and receivers uses different
wireformat.tightEncodingEnabled options, broker will get marshalling
problem. This is because when openwire messages are converted to
core messages, and later these core messages converted to openwire
messages, the broker uses a mashaller that comes with the connection
used to carry the messages.

For example, if a producer sents a message using option "wireformat
.tightEncodingEnabled=false" and a receiver tries to receive it
using 'true' for the same option, it'll never get it because the
broker will fail to use a "tight encoding" marshaller to
decode a 'loose encoded' message.

To fix the problem, we always use 'tight encoding' for internal
message converters.
2017-09-19 07:50:24 +08:00
Pat Fox 89a64ff11c ARTEMIS-1423 adding numeric filtering for ActiveMQServerControl.listQueues()/listAddresses()/listSessions() 2017-09-18 15:15:31 -05:00
Michael Andre Pearce 60b0a0bd09 NOJIRA - Speed up Acknowledgement test
Currently this test can take over 30seconds just itself. It seems we can safely reduce the number of messages to validate perf improvement greatly reducing test time.
2017-09-16 12:33:49 -04:00
Clebert Suconic 481f753589 ARTEMIS-1419 Small tweak on openwire Test 2017-09-13 18:25:10 -04:00
Howard Gao e4fb722ad8 ARTEMIS-1419 OpenWire advisory message never deleted
By default, every openwire connection will create a queue
under the multicast address ActiveMQ.Advisory.TempQueue.
If a openwire client is create temporary queues these queues
will fill up with messages for as long as the associated
openwire connection is alive. It appears these messages
do not get consumed from the queues.

The reason behind is that advisory messages don't require
acknowledgement so the messages stay at the queue.
2017-09-13 18:21:43 -04:00
Michael Andre Pearce 7d943cc6f7 ARTEMIS-1405: Fix PurgeOnNoConsumer queue config is not persisted on restart
Added integration test, to prove issue, and assert fix.
Fix PersistentQueueBindingEncoding to return value, not false.
Fix some method arg name to align with class interface arg name
2017-09-13 18:21:13 -04:00
Pat Fox 196df92306 NO-JIRA add unit tests for ActiveMQServerControl listAddresses() and listConsumers() 2017-09-12 12:59:43 -05:00
Michael Andre Pearce ee53b2bf53 ARTEMIS-1413: FIX JMSDeliveryMode/Priority on AMQP to CORE conversion
Added test case for cross protocol on JMSDeliveryMode proving issue, and asserting fix
Added fix to AmqpCoreConverter to ensure durability (JMSDeliveryMode) is retained.

Similar issue spotted with JMSPriority as with JMSDeliveyMode, fixing at the same time.
Added extra test case for jmspriority
Added fix for jmspriority
2017-09-11 23:18:50 +01:00
Martyn Taylor 152791c230 ARTEMIS-1402 AMQP notfound on unmatched FQQN
Return an AMQP not:found error to the client, if the supplied queue in
an FQQN belongs to an address other than what is provided in the FQQN.
2017-09-08 12:41:36 +01:00
Martyn Taylor 32ac370edc ARTEMIS-1392 Fix NPE when FQQN queue does not exist during multicast subscribe 2017-09-08 12:41:36 +01:00
Francesco Nigro 35c3475092 ARTEMIS-1401 Numerical overflow fix when using System::nanoTime 2017-09-07 10:40:14 -04:00
gtully 99b2e4c0fb ARTEMIS-1373 - support memberOf type query for role mapping and respect roleName attribute AMQ-3064 2017-09-07 14:11:48 +01:00
Jens Reimann d2dcf1bba3 Drop Eclipse Foundation repository
Eclipse Paho 1.1.0 can be consumed from Maven Central.

Signed-off-by: Jens Reimann <jreimann@redhat.com>
2017-09-06 10:30:13 -04:00
Stanislav Knot 12f085a934 ARTEMIS-1385 fixed incomplete comment and typo (appendix) 2017-09-06 10:24:43 -04:00
Pat Fox 26389c472d NO-JIRA added unit test to exercise ActiveMQServerControl.listQueues() 2017-09-06 09:54:29 -04:00
Martyn Taylor 16dfd777b8 ARTEMIS-1387 Fix AMQPtoMQTT and Link route issues 2017-09-06 11:21:56 +01:00
gtully 125bd41f9d ARTEMIS-1372 ARTEMIS-1373 documentation updates 2017-09-06 10:22:28 +01:00
Clebert Suconic c8982d775b [maven-release-plugin] prepare for next development iteration 2017-09-05 17:03:48 -04:00
Clebert Suconic 84d5ac65b4 [maven-release-plugin] prepare release 2.3.0 2017-09-05 17:03:37 -04:00
gtully 5db68a451b ARTEMIS-1372 - alow auth to ldap via kerberos 2017-09-05 16:35:14 -04:00
gtully ab7dc69b5d ARTEMIS-1373 - allow LDAP login module apply role mapping to existing user principals in the subject 2017-09-05 16:35:14 -04:00
gtully 986af2e99d ARTEMIS-1381 - fix test QueueControlUsingCoreTest 2017-09-04 15:17:12 +01:00
Pat Fox 4618b192c2 ARTEMIS-1381 add JMX operation removeAllMessages() to the queue
fix checkstyle trailing spaces
2017-09-01 00:55:07 +02:00
Clebert Suconic 4f1504ee57 NO-JIRA: update extra tests pom 2017-08-31 14:32:09 -04:00
Clebert Suconic ed1b268d42 [maven-release-plugin] prepare for next development iteration 2017-08-31 13:48:09 -04:00
Clebert Suconic 21f2a4a52c [maven-release-plugin] prepare release 2.3.0 2017-08-31 13:47:57 -04:00
Clebert Suconic 6483e4a0aa ARTEMIS-1378 Improving update Queues and Addresses 2017-08-30 22:45:33 -04:00
Justin Bertram 2f5a9322d0 ARTEMIS-1379 Some queue stats not threadsafe 2017-08-30 10:53:43 -04:00
Clebert Suconic 0df12657af ARTEMIS-1378 Update Address is broken, may lose messages 2017-08-29 20:48:01 -04:00
Clebert Suconic 9df2ffe248 ARTEMIS-1297 fixing intermittent failure 2017-08-29 19:04:23 -04:00
Clebert Suconic 6fda75a9fc ARTEMIS-1297 Load balance or redistribution of AMQP Messages 2017-08-29 12:56:15 -05:00
Michael Andre Pearce 9fbbb7c416 ARTEMIS-1361 - Support Updating queue config from broker.xml at runtime
Add support to update Queue config via reload using existing updateQueue method at runtime.
Add/extend unit test cases to include testing reload of queue config.
2017-08-25 22:46:50 -04:00
Justin Bertram 605ab08c05 ARTEMIS-1371 update JGroups stack files 2017-08-25 22:46:13 -04:00
Clebert Suconic f2d74e7a43 ARTEMIS-1367 Moving CriticalAnalyzerPolicy 2017-08-24 18:08:01 -04:00
Clebert Suconic 78321668ea NO-JIRA: fixing test 2017-08-23 16:04:42 -04:00
Timothy Bish 9021e0301d NO-JIRA Fix tests that fail on loaded system
Tests that can fail on loaded system due to not waiting for metrics
updates.
2017-08-23 10:51:31 -04:00
Clebert Suconic a85e75daa1 NO-JIRA fixing intermittent test failure
There's no semantic change here, just a test fix
2017-08-23 10:49:35 -04:00
Clebert Suconic cf8b42a145 ARTEMIS-1367 Fixing test 2017-08-23 09:08:40 -04:00
Justin Bertram e82f611e2e NO-JIRA fix intermittently failing MQTT test 2017-08-22 22:08:24 -04:00
Clebert Suconic 27d37b735d NO-JIRA fixing TimedBufferTest 2017-08-19 12:48:34 -04:00
Clebert Suconic 4f8b4d054d NO-JIRA fixing test 2017-08-19 12:44:50 -04:00
Clebert Suconic 2033ee8c43 NO-JIRA fixing MQTT Test 2017-08-18 22:58:52 -04:00
Clebert Suconic ce6942a9aa ARTEMIS-1353 Initial replication of large messages out of executor
This is based on the work @jbertram made at the github pr #1466 and the discussions we had there
2017-08-18 16:19:25 -04:00
Andy Taylor 4ee9580e69 ARTEMIS-1350 - Added close button to console for client objs
https://issues.apache.org/jira/browse/ARTEMIS-1350
2017-08-18 13:55:37 +01:00
Justin Bertram bcf93404c6 NOJIRA fix policy for NettySecurityClientTest 2017-08-17 17:00:25 +01:00
Christopher L. Shannon (cshannon) 03785a3142 ARTEMIS-1347 - Pass the QueueBinding to beforeCreateConsumer
Instead of just the queue name the entire QueueBinding object is now
passed to the beforeCreateConsumer plugin method. Also cleaned up some
comments
2017-08-17 10:14:11 -05:00
Jiri Danek 23c42401bb NO-JIRA Add asserts to SessionTest#testIllegalStateException 2017-08-17 10:12:31 -05:00
Martyn Taylor bb3965b7f7 ARTEMIS-1349 Add management views for client objects 2017-08-17 10:44:41 +01:00
Clebert Suconic cb7183c473 ARTEMIS-1348 Fixing Checkstyle 2017-08-15 12:31:06 -04:00
Michael Andre Pearce 26752a7aaf ARTEMIS-1348 Support LVQ for AMQP
Add support for LVQ, using the same property key as core "_AMQ_LVQ_NAME"
Add test case for AMQP LVQ.
2017-08-12 23:43:37 +01:00
Clebert Suconic 8cef53f39d NO-JIRA Adding LargeMessage & LVQTest 2017-08-10 21:26:17 -04:00
Clebert Suconic cc26936917 ARTEMIS-1333 removing Exception(trace) from test 2017-08-10 14:42:16 -04:00
Christopher L. Shannon (cshannon) 64bacee28a ARTEMIS-1332 Always return a response to the client on session metadata add
This will make sure that if there is an ActiveMQException thrown the
client will get notified and not hang.
2017-08-10 12:28:14 -04:00
Clebert Suconic 012fe58b2c ARTEMIS-1333 fixing test, cannot flush itself from Runnable 2017-08-09 16:02:10 -04:00
Michael Andre Pearce 0bc5510059 ARTEMIS-1342: Support Netty Native KQueue on macOS
Add support for KQueue for when server or client runs on macOS. This is inline with the epoll support for linux.
2017-08-09 15:23:16 -04:00
Clebert Suconic fabc0701a3 ARTEMIS-1333 SendACK listener fix 2017-08-09 15:18:54 -04:00
Clebert Suconic 96c6268f5a ARTEMIS-1333 SendACK listener message loss (adding test)
next commit should have the fix.
this is to make it easy to confirm the fix by people looking.
2017-08-09 15:18:54 -04:00
Clebert Suconic 1ace306121 ARTEMIS-1328 Improving direct delivery check
Instead of wait to flush an executor,
I have added a method isFlushed() which will just translate to the
state on the OrderedExecutor.

In the case another executor is provided (for tests) there's a delegate
into normal executors.
2017-08-08 14:00:58 -04:00
gtully 9fedb47c40 [ARTEMIS-1310] [ARTEMIS-1264] consolidate configuration to require login configuration scope 2017-08-08 13:28:50 -04:00
gtully ca7197b5c3 [ARTEMIS-1310] add amqp sasl gssapi mechanism support
delegate to the jdk saslServer. Allow acceptor configuration of supported mechanismis; saslMechanisms=<a,b>
and allow login config scope for krb5 to be configured via saslLoginConfigScope=x
2017-08-08 13:28:50 -04:00
Michael Andre Pearce 7b40abead9 ARTEMIS-1308: Make acknowlegde in AcitveMQMessage non blocking
Allow commit within the acknowledge to be non blocking (batch) this toggles the on the existing blockonacknowlegde config.
2017-08-08 10:07:15 -04:00
Clebert Suconic 88f78d97ef ARTEMIS-1324 Fix test 2017-08-07 23:43:43 -04:00
Clebert Suconic f16af75354 ARTEMIS-1324 Deadlock detection and health check of critical components 2017-08-07 18:40:03 -04:00
Justin Bertram b6b8fa411f ARTEMIS-1322 ServerLocator option to ignore topology for load-balancing 2017-08-04 13:56:30 -05:00
Michael Andre Pearce 776ec0b9fd ARTEMIS-1313 getAddresses in PostOfficeImpl does not correctly return all addresses
Fix so that getAddresses uses addressInfoMap instead of the mappings so that addresses without queues also are returned
2017-08-02 12:50:34 -04:00
Howard Gao 613b459c52 ARTEMIS-1315 Client disconnection may cause consumer to hang
When calling a consumer to receive message with a timeout
(receive(long timeout), if the consumer's buffer is empty, it sends
a 'forced delivery' the waiting forever, expecting the server to
send back a 'forced delivery" message if the queue is empty.

If the connection is disconnected as the arrived 'forced
delivery' message is corrupted, this 'forced delivery' message
never gets to consumer. After the session is reconnected,
the consumer never knows that and stays waiting.

To fix that we can send a 'forced delivery' to server right
after the session is reconnected.
2017-08-02 12:48:43 -04:00
Clebert Suconic c3f8321c42 NO-JIRA Improving a test with Wait 2017-08-02 10:39:19 -04:00
Francesco Nigro 74f243cc4d ARTEMIS-1312 TimedBuffer doubled timeout with blocking flush 2017-08-01 11:52:28 -04:00
Francesco Nigro 567bfe3b9b ARTEMIS-1312 TimedBuffer doubled timeout with blocking flush 2017-08-01 06:34:25 -04:00
Justin Bertram 8c8ab0adc1 ARTEMIS-1299 support commas in RA connection parameter values 2017-07-28 18:00:50 -04:00
Clebert Suconic cd9ce6a502 ARTEMIS-1304 ignoring invalid test 2017-07-25 10:08:11 -04:00
Clebert Suconic 955557a31c NO-JIRA: Fix extra-tests pom after release 2017-07-24 21:30:53 -04:00
Clebert Suconic fdad83be22 [maven-release-plugin] prepare for next development iteration 2017-07-24 21:21:18 -04:00
Clebert Suconic 71b1cc2a20 [maven-release-plugin] prepare release 2.2.0 2017-07-24 21:21:06 -04:00
Clebert Suconic 50a900c04b ARTEMIS-1304 Message loss on Commmit timeout during failover 2017-07-24 20:23:56 -04:00
Clebert Suconic f37af02074 ARTEMIS-1276 fixing license headers 2017-07-24 11:10:55 -04:00
Jiri Danek 1b3d9cfed0 ARTEMIS-1276 fix JmsSendReceiveWithMessageExpirationTest 2017-07-24 10:50:52 -04:00
Erich Duda 22b4755fbb ARTEMIS-1265 JaCoCo profile for getting code coverage report
Added two maven profiles for:
 - generating JaCoCo exec files
 - generating JaCoCo reports
2017-07-24 09:56:08 -04:00
Jiri Danek d732262f8c ARTEMIS-1276 delete MessageEvictionTest (feature not implemented)
The test is broken. It can be fixed by doing

```java
FakeTransportConnector(URI uri) {
   setServer(new TransportServer {
     @Override
     public URI getConnectURI() {
        return uri;
     }
but then the test would fail because message
 eviction is not supported by Artemis.
2017-07-24 09:50:40 -04:00
Jiri Danek 7e9c3fdfb7 ARTEMIS-1276 avoid System.exit in tests as Surefire cannot deal with that
This change results in many more tests being run. Previously, 662 tests
were executed. Now, 1166 tests is executed. The running time has increased
from ~20 minutes to ~50 minutes.
2017-07-24 09:50:40 -04:00
xstefank 553043393e ARTEMIS-1257 ActiveMQActivationSpec.java should use boxed types for attributes values according to the JCA specification 2017-07-24 09:41:25 -04:00
Francesco Nigro fdbf4f450a ARTEMIS-1301 Network failures recognition on backpressure while streaming large messages 2017-07-20 10:33:04 +01:00
Martyn Taylor 34df3afe0c Revert "ARTEMIS-1290 QueueQuery add prefix on address"
This reverts commit 44506f2258.
2017-07-18 16:16:42 -04:00
Clebert Suconic ad372ec98e ARTEMIS-1294 Using older sleep on TimedBuffer
And also adding test
2017-07-18 16:01:51 -04:00
Andy Taylor 6f140897c6 ARTEMIS-1296 - fix quorum vote
Add a check on top of just being able to connect to a live broker

https://issues.apache.org/jira/browse/ARTEMIS-1296
2017-07-18 08:10:11 +01:00
Martyn Taylor 44506f2258 ARTEMIS-1290 QueueQuery add prefix on address 2017-07-17 10:31:20 -04:00
Clebert Suconic f18b4ee0c9 ARTEMIS-1287/ARTEMIS-1292 Complete Page on the Journal
fixing PagingTest.testDeletePhysicalPages
2017-07-14 15:04:45 -04:00
Clebert Suconic baeca47b44 ARTEMIS-1287 Another fix on CorePluginTest
Trying to fix this test that's only failing on jenkins
2017-07-14 00:48:12 -04:00
Clebert Suconic 593f99df37 ARTEMIS-1287 Fix on CorePluginTest
Sometimes the message is expired before it reaches the client
2017-07-13 18:14:03 -04:00
Clebert Suconic 31d5758885 ARTEMIS-1288 crash during compact control files issues
The system would become irresponsive if crashed right at the
control file writing.
2017-07-13 17:12:58 -04:00
Clebert Suconic ac6420038f ARTEMIS-1287 Simple test fix SimpleOpenWireTest 2017-07-13 16:16:00 -04:00
Clebert Suconic cc6ca36c51 NO-JIRA Cleanup on testsuite 2017-07-13 13:25:50 -04:00
Clebert Suconic 7137743612 NO-JIRA Making a test harder to fail 2017-07-13 12:32:20 -04:00
Clebert Suconic c1dfc202e7 NO-JIRA: Simple fix on a test 2017-07-13 10:54:58 -04:00
Clebert Suconic 0bfdcb764c NO-JIRA: more fixes on plugintests
some asynchronously things on the server were making these to fail.
add some checkpoints to make sure it happens smoothly.
2017-07-13 09:19:15 -04:00
Clebert Suconic 36a948b225 NO-JIRA: Fixing intermittent failures on PluginTests 2017-07-12 21:15:31 -04:00
Jiri Danek 3e1237c1eb NO-JIRA fix few typos and a docstring 2017-07-11 19:34:06 -04:00
Clebert Suconic 36357e4556 ARTEMIS-1282 ClientSession.ceateQueue (String) method is using temporary queues 2017-07-11 19:24:22 -04:00
Clebert Suconic 7fd17f407f ARTEMIS-1269 Simple Actor to replace certain executions
This is replacing an executor on ServerSessionPacketHandler
by a this actor.

This is to avoid creating a new runnable per packet received.

Instead of creating new Runnable, this will use a single static runnable
and the packet will be send by a message, which will be treated by a listener.

Look at ServerSessionPacketHandler on this commit for more information on how it works.
2017-07-11 14:22:36 -04:00
Clebert Suconic 82f071ff46 ARTEMIS-1280 Avoiding leak on Queue futures 2017-07-11 11:32:03 -04:00
Clebert Suconic eab0cb587c NO-JIRA: Fixing ReceiveTest::testReceiveImmediate 2017-07-11 11:15:11 -04:00
Martyn Taylor 905098bc4e ARTEMIS-1268 Fix LargeMessages over STOMP 2017-07-11 10:58:40 -04:00
Andy Taylor 9ad3ad4657 ARTEMIS-1277 - purgeOnNoConsumer is not working properly
make sure rollback doesn't add messages back

https://issues.apache.org/jira/browse/ARTEMIS-1277
2017-07-11 11:25:48 +01:00
Odyldzhon Toshbekov 34697d58e1 ARTEMIS-1272 fix mqtt acknowledgement issue 2017-07-10 22:37:58 -04:00
Erich Duda ab92306d81 ARTEMIS-1274 MultipleProducersTest.wrongQueue fails 2017-07-10 14:41:32 -04:00
Jiri Danek ad228e202f NO-JIRA: Addressing some deprecated usage on the codebase
- PROTOCOL_PROP_NAME
- ConnectionLifeCycleListener
- GENERIC_IGNORED_FILTER
- HttpHeaders.Names
- HttpHeaders.Names and similar
2017-07-10 14:06:07 -04:00
gtully d4150be0d9 ARTEMIS-1264 allow role mapping via chained login modules
Add krb5sslloginmodule that will populate userPrincipal that can be mapped to roles independently
Generalised callback handlers to take a connection and pull certs or peerprincipal based on
callback. This bubbled up into api change in securitystore and security manager
2017-07-06 23:41:02 -04:00
Clebert Suconic 01a5a60b37 NO-JIRA: fixing test 2017-07-06 23:37:01 -04:00
Clebert Suconic 89e84e1320 ARTEMIS-1269 Fixing blocked replication
If replication blocked anything on the journal
the processing from clients would be blocked
and nothing would work.

As part of this fix I am using an executor on ServerSessionPacketHandler
which will also scale better as the reader from Netty would be feed immediately.
2017-07-06 19:04:48 -04:00
gtully cda1e018e1 ARTEMIS-1264 Foundation work for authentication with Kerberos using KRB_ cypher suites.
Core client with netty connector and acceptor doing kerberos
jaas.doAs around sslengine init such that the SSL handshake can do kerberos ticket
generaton and validation.
The kerberos authenticated user is then validated with the security manager before
being populated into the message userId.
The feature is enabled with the kerb5Config property. When lowercase it is the
principal. With a leading uppercase char it is the login.config entry to use.
2017-07-06 11:30:25 -04:00
Clebert Suconic 387fca584e ARTEMIS-1269 replication won't finish synchronization 2017-07-01 00:48:33 -04:00
Francesco Nigro 7075e2e457 ARTEMIS-1266 Mapped Journal refactoring
The MAPPED journal refactoring include:
 - simplified lifecycle and logic (eg fixed file size with single mmap memory region)
 - supports for the TimedBuffer to coalesce msyncs (via Decorator pattern)
 - TLAB pooling of direct ByteBuffer like the NIO journal
 - remove of old benchmarks and benchmark dependencies
2017-06-30 16:17:19 +02:00
Howard Gao d50f577cd5 ARTEMIS-1221 Duplicated ID causes LargeMessage lost at backup
When a large message is replicated to backup, a pendingID is generated
when the large message is finished. This pendingID is generated by a
BatchingIDGenerator at backup.

It is possible that a pendingID generated at backup may be a duplicate
to an ID generated at live server.

This can cause a problem when a large message with a messageID that is
the same as another largemessage's pendingID is replicated and stored
in the backup's journal, and then a deleteRecord for the pendingID
is appended. If backup becomes live and loads the journal, it will
drop the large message add record because there is a deleteRecord of
the same ID (even though it is a pendingID of another message).
As a result the expecting client will never get this large message.

So in summary, the root cause is that the pendingIDs for large
messages are generated at backup while backup is not alive.

The solution to this is that instead of the backup generating
the pendingID, we make them all be generated in advance
at live server and let them replicated to backup whereever needed.
The ID generater at backup only works when backup becomes live
(when it is properly initialized from journal).
2017-06-29 00:03:47 +08:00
Clebert Suconic 5c2144b782 ARTEMIS-1256 PagingOMETest.testPageCleanup fails
Using a Wait condition.

This closes #1370
2017-06-27 12:48:35 -04:00
Christopher L. Shannon (cshannon) a538b969c0 ARTEMIS-1258 - Add ServerSession as an argument to beforeSend and
afterSend
2017-06-27 12:42:40 -04:00
Clebert Suconic 437232b50e ARTEMIS-1253 Renaming NetworkReplicationTest to NetworkIsolationTest 2017-06-27 12:21:37 -04:00
Clebert Suconic 36110da9c8 ARTEMIS-1253 Refactoring renaming stop(boolean) to fail(boolean)
This method name would clash with ServiceComponent
As the real meaning here on this method is just to failover
So I've renamed the method to avoid the clash with my next commit

(I've done this on a separate commit as you may need to redo this
 commit from scratch again in other branches instead of lots of clashes on cherry-pick)
2017-06-26 16:15:39 -04:00
Clebert Suconic 4bae814908 ARTEMIS-1253 Adding testcase 2017-06-26 16:15:39 -04:00
Howard Gao 045021f7df ARTEMIS-1220 Diverted LargeMessage file corrupted during replication
When a large message is being diverted, a new copy of the original
message is created and replicated (if there is a backup) to the backup.

In LargeServerMessageImpl.copy(long) it reuse a byte array to copy
message body. It is possible that one block of date is read into
the byte array before the previous read has been replicated,
causing the replicated bytes to corrupt.

If we make a copy of the byte array before replication, the corruption
of data will be avoided.
2017-06-26 14:31:43 -04:00
Clebert Suconic b50ae5a916 NO-JIRA Fixing a test 2017-06-23 14:44:23 -04:00
Erich Duda c5a25d3322 ARTEMIS-1250 ClusteredMessageCounterTest.testNonDurableMessageAddedWithPaging fails
Before sending of messages to server 0 begins, the test
should wait until consumer is registered at RemoteQueueBindingImpl
on server 0. Otherwise some messages may not be rebalanced
to server 1.
2017-06-23 13:39:25 +02:00
Clebert Suconic e709fc366d NO-JIRA: Fixing a test 2017-06-22 17:59:55 -04:00
Clebert Suconic 339fa20f2b NO-JIRA: Fixing JournalImplTestUnit
it doesn't really matter the number of files.. as long as the data is valid.
This type of assertion limits the implementation. it's mocking test with too much intrusion
over the implementation. Hence I'm removing these clauses that will fail eventually.
2017-06-22 17:49:43 -04:00
Guillaume Nodet b6dcff039f [ARTEMIS-1196] Fix missing JSON support 2017-06-22 12:16:25 -04:00
Michael Andre Pearce f63f130407 ARTEMIS-1235 delete queues when broker.xml changes
Add extra configuration to address-settings to be able to
control / enable address/queue deletion by pattern,
rather than a global toggle.

Add support in the reload logic to remove address
and/or queues if the address matches an address setting,
where it is enabled.
2017-06-22 12:12:12 -04:00
Jiri Danek 60fad35cfe ARTEMIS-1244 propagate retain flag of received message 2017-06-22 12:00:40 -04:00
Michal Tóth 2b80426153 ARTEMIS-1244 Retain flag code todo comment
Identified possible bug in MQTT receive of missing retained flag.
2017-06-22 11:51:11 -04:00
Michal Tóth e801df7974 ARTEMIS-607 New tests AMQP,MQTT,Stomp interceptor properties tests
Added tests for AMQP, MQTT and Stomp protocol for interceptors.
Tests are checking intercepted message properties.
Linked issue ARTEMIS-607
2017-06-22 11:51:11 -04:00
Clebert Suconic 85aeac99ab Revert "ARTEMIS-1227 Internal properties not removed from messages"
This reverts commit f465996444.

Following discussion on https://github.com/hornetq/hornetq/pull/2114
2017-06-22 09:49:45 -04:00
Clebert Suconic e78a902881 ARTEMIS-1224 fixing test 2017-06-21 20:00:13 -04:00
Howard Gao e258bdf188 ARTEMIS-1242 OpenWire Transactions never removed
Openwire doesn't remove the finished transactions
(committed or rolledback).
2017-06-21 11:22:59 -04:00
Howard Gao 3d0896f87c ARTEMIS-1240 Disconnect at client side on decoding error
When a broken packet arrives at client side it causes decoding error.
Currently artemis doesn't handle it properly. It should catch such
errors and disconnect the underlying connection, logging a proper
warning message
2017-06-21 10:25:34 -04:00
Michael Andre Pearce 44b7e455cb ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour
Use AcitveMQDestination for subscription naming, fixing and aligning queue naming in the process.

The change is behind a configuration toggle so to avoid causing any breaking changes for uses not expecting.
2017-06-19 12:44:13 +01:00
Andy Taylor d2594a280b ARTEMIS-1211 - Allow local transactions when no jta in Resource Adapter
https://issues.apache.org/jira/browse/ARTEMIS-1211
2017-06-19 10:08:30 +01:00
Martyn Taylor f20703a13e ARTEMIS-1215 Fix address validation on sub # 2017-06-14 11:39:39 -05:00
Jiri Danek 9ad8b71273 ARTEMIS-1212 add a jms.queue. workaround to HornetQProtocolManagerTest 2017-06-14 11:35:50 -05:00
Andy Taylor 30a6ac703e ARTEMIS-1224 - change the journal file size to nearest multiple
https://issues.apache.org/jira/browse/ARTEMIS-1224
2017-06-14 10:16:23 +01:00
Howard Gao f465996444 ARTEMIS-1227 Internal properties not removed from messages
In a cluster if a node is shut down (or crashed) when a
message is being routed to a remote binding, a internal
property may be added to the message and persisted. The
name of the property is like _AMQ_ROUTE_TOsf.my-cluster*.
if the node starts back, it will load and reroute this message
and if it goes to a local consumer, this property won't
get removed and goes to the client.

The fix is to remove this internal property before it
is sent to any client.
2017-06-12 13:01:12 -05:00
Erich Duda 30e8ca656c ARTEMIS-1208 Do not use reconnect-atempts=-1 in tests 2017-06-08 17:38:11 -04:00