Commit Graph

582 Commits

Author SHA1 Message Date
Michael Klishin 6a44e0e2ef
Correct a double quote introduced in #4603 2022-04-20 16:01:29 +04:00
Michael Klishin 0ae3f19698
mqtt.queue_type => mqtt.durable_queue_type 2022-03-31 19:48:00 +04:00
Gabriele Santomaggio 2c49748c70
Add quorum queues support for MQTT
Enable the quorum queue for MQTT only if CleanSession is False.
QQs don't support auto-delete flag so in case Clean session is True
the queue will be a classic queue.

Add another group test non_parallel_tests_quorum.
For Mixed test the quorum_queue feature flag must be enabled.

Add log message
2022-03-30 08:49:17 -07:00
Michael Klishin c38a3d697d
Bump (c) year 2022-03-21 01:21:56 +04:00
Michael Klishin f7d32d69f8 Introduce a new CLI tool (scope), rabbitmq-tanzu
For Tanzu (commercial) plugins to attach their commands to instead of
polluting rabbitmqctl.

Pair: @pjk25
(cherry picked from commit 6e0f2436fa)
2021-11-30 14:54:09 +00:00
Alexey Lebedeff e0723d5e66 Prevent crash logs when mqtt user is missing permissions
Fixes #2941

This adds proper exception handlers in the right places. And tests
ensure that it indeed provides nice neat logs without large
stacktraces for every amqp operation.

Unnecessary checking for subscribe permissions on topic was dropped,
as `queue.bind` does exactly the same check. Topic permissions tests
were also added, and they indeed confirm that there was no change in
behaviour.

Ideally the same explicit topic permission check should be dropped for
publishing, but it's more complicated - so for now there only a
detailed comment in the source code explaining it.

A few other things were also optimized away:
- Using amqp client to test for queue existence
- Creating queues/starting consumptions too eagerly, even if not yet
  requested by client
2021-11-12 18:03:05 +01:00
Carl Hörberg 681cb78b0d Test that proxy dest address is picked up in all plugins 2021-03-31 11:28:40 +02:00
Michael Klishin 52479099ec
Bump (c) year 2021-01-22 09:00:14 +03:00
Michael Klishin e8fccbaf48
MQTT auth_SUITE: synchronise concurrent setup with the test 2021-01-13 16:41:03 +03:00
kjnilsson 04a55e0ee6 bug fixes 2020-12-22 15:16:17 +00:00
kjnilsson 067a42e066 Optimise MQTT state machine
It was particularly slow when processing down commands.
2020-12-21 15:58:32 +00:00
kjnilsson 6fdb7d29ec Handle errors in crashing_queues_SUITE
As the connection may crash during the previous declaration and a caught
error would be returned in amqp_connection:open_channel/1 that wasn't
handled previously. Exactly how things fail in this test is most likely
very timing dependent and may vary.

Also fixes mqtt test where the process that set up a mock auth ETS table
was transient when an rpc timeout was introduced
2020-12-03 13:56:09 +00:00
dcorbacho d80e8e1bec Add protocol to auth attempt metrics 2020-09-23 11:16:13 +01:00
dcorbacho b138241b52 Add auth attempt metrics 2020-08-28 13:19:05 +01:00
D Corbacho 1a9632576d Merge pull request #236 from rabbitmq/switch-to-MPL-2.0
Switch to Mozilla Public License 2.0 (MPL 2.0)
2020-07-13 17:40:24 +01:00
dcorbacho 119eb99e8d Switch to Mozilla Public License 2.0 (MPL 2.0) 2020-07-13 17:39:36 +01:00
kjnilsson 3cf84a19b2 Fix mqtt_machine crash bug
When a client performs repeated requests the state machine would crash
with a match exception.

Add unit test suite for mqtt_machine.
2020-07-09 14:41:00 +01:00
Jean-Sébastien Pédron dcc5f7b553 Update copyright (year 2020) 2020-03-10 16:39:48 +01:00
kjnilsson eadf5f7094 Make interactions with Ra async
To avoid blocking when registering or unregistering a client id. This is
ok as informing the current connection holder of the client id is
already async. This should be more scalable and provide much better MQTT
connection setup latency.
2020-02-10 17:28:18 +00:00
Michael Klishin 2927f473ce (c) bump 2019-12-29 05:50:32 +03:00
Michael Klishin cf9e258d49 Make it possible to override client ID in some tests 2019-11-25 17:37:50 +03:00
Michael Klishin 5947ac6961 Use a topic name that has R and W permissions 2019-11-05 17:07:55 +00:00
Michael Klishin 35a99a24a2 Downgrade QoS 2 to QoS 1 when sending Last Will
Closes #214.
2019-11-05 16:54:20 +00:00
Michael Klishin ab1b923794 (c) year 2019-10-22 13:31:13 +03:00
Arnaud Cogoluègnes 26a17e8530 Modernize Java test suite
Migrate to JUnit 5, use TestInfo to create test-related MQTT
client ID when possible, remove Awaitility in favor of a in-house
utility and the use of lambdas, clean some code.
2019-09-23 14:43:40 +02:00
Luke Bakken e8c9b6d118 Remove two unnecessary class variables 2019-09-20 15:51:39 -07:00
Luke Bakken a07c231891 Ensure each test has a meaningful client id 2019-09-20 15:44:28 -07:00
Luke Bakken 2141339a80 Remove another snowflake topic 2019-09-20 09:16:04 -07:00
Luke Bakken 13f881e6e3 Remove another snowflake topic 2019-09-20 05:22:16 -07:00
Luke Bakken e19deefc14 Remove "mid" topic and replace with test-topic 2019-09-20 05:01:29 -07:00
Luke Bakken 60ac7affa5 Use per-testcase instance of TestMqttConnectOptions 2019-09-19 17:12:55 -07:00
Luke Bakken 54a3ab1666 Formatting 2019-09-19 16:37:05 -07:00
Luke Bakken a487dc427a Fix willIsRetained test 2019-09-19 11:39:48 -07:00
Luke Bakken d92c60e882 Fixed the lastWillNotSentOnRestrictedTopic test 2019-09-19 11:17:13 -07:00
Luke Bakken d8669f7bc0 Increase debug level
One test fixed at least
2019-09-19 10:00:43 -07:00
Michael Klishin b94ceeb398 Java integration suite: reduce use of shared mutable state
Per discussion with @acogoluegnes.
2019-09-19 15:26:21 +03:00
Michael Klishin 4755325f19 An attempt to avoid Paho Java state exceptions 2019-09-19 11:39:58 +03:00
Michael Klishin 82f526baed New Paho version does not handle null passwords 2019-09-19 10:28:39 +03:00
Michael Klishin 103dc2c5eb Bump RabbitMQ and Paho clients used in tests 2019-09-19 09:26:26 +03:00
Luke Bakken 92f1ca1971 Rename sparkplug_b to sparkplug 2019-09-06 08:58:04 -07:00
Arnaud Cogoluègnes f0ef67e2fc Use AMQP topic name in translation test
References #206
2019-09-06 15:07:29 +02:00
Luke Bakken 061651f31e Correctly set topic permissions for sparkplug B prefix, and use correct topics in test 2019-09-04 10:24:47 -07:00
Luke Bakken e7554def0a Topic translation CT tests pass 2019-09-04 07:43:35 -07:00
Luke Bakken 8e1ddac03d Add CT tests for topic translation funs, failing currently 2019-09-04 07:43:35 -07:00
Luke Bakken 04fcd898ca Add failing test involving MQTT/Sparkplug B and AMQP interop 2019-09-04 07:43:35 -07:00
Luke Bakken e0504e7617 Add failing test for mqtt.sparkplug_b schema element 2019-09-04 07:43:35 -07:00
Arnaud Cogoluègnes c403200bad Do not reach out to all nodes when listing connections
The way connections are listed already contains all the connections, so
there is no need to reach out to all cluster nodes and aggregate the
results, as it results in duplicate lines.

The command test now uses a cluster to make sure connections are listed
properly in a cluster.

[#167639960]

Fixes #202
2019-08-01 09:29:16 +02:00
Michael Klishin 7d8d7c491c Return false here as this module does not provide an update_state/2 2019-07-02 16:27:10 +02:00
Arnaud Cogoluègnes 689a557c4c Add state_can_expire/0 to mock authn/authz backend
References rabbitmq/rabbitmq-auth-backend-oauth2#28
2019-07-02 15:50:12 +02:00
Jean-Sébastien Pédron 437bb5da96 Java testsuite: Use a third RabbitMQ node for the cluster-wide client ID tracking test
This is to ensure that the test can pass in a mixed-versions cluster
where odd-numbered nodes might not support clsuter-wide client ID
tracking (RabbitMQ 3.7.x).
2019-06-12 16:29:38 +02:00
Jean-Sébastien Pédron cf082aa6fd test/java_SUITE_data/pom.xml: Make it compatible with Java 12 2019-06-12 16:29:06 +02:00
Jean-Sébastien Pédron 3c111a18be mqtt_node: Skip incompatible nodes when configuring Ra cluster
In the cluster_SUITE testsuite:

All even-numbered nodes will use the same code base when using a
secondary Umbrella. Odd-numbered nodes might use an incompatible code
base. When cluster-wide client ID tracking was introduced, it was not
put behind a feature flag because there was no need for one. Here, we
don't have a way to ensure that all nodes participate in client ID
tracking. However, those using the same code should. That's why we
limit our RPC calls to those nodes.

That's also the reason why we use a 5-node cluster: with node 2 and
4 which might not participate, it leaves nodes 1, 3 and 5: thus 3
nodes, the minimum to use Ra in proper conditions.

References #91, #195.
[#135330629]
2019-06-11 18:26:27 +02:00
Jean-Sébastien Pédron 391c44c665 rabbit_auth_backend_mqtt_mock: Move this test module to `test/` 2019-06-11 16:15:10 +02:00
Jean-Sébastien Pédron 8de6ab7e81 cluster_SUITE: Bump suite timestrap to 5 minutes
One minute seems too short for those tests in CI.
2019-06-11 13:52:05 +02:00
Michael Klishin e900354db5 Merge pull request #195 from rabbitmq/rabbitmq-mqtt-91
Cluster-wide MQTT client id tracking
2019-06-11 01:32:20 +03:00
Michael Klishin 91d3d72bf8 Refactor 2019-06-11 01:31:44 +03:00
Michael Klishin 91a6252cff More tests 2019-06-11 01:26:07 +03:00
Arnaud Cogoluègnes 7f8708bd85 Add test to check client id propagation
This commit adds a test to check the MQTT client is properly propagated
to the authentication and authorization backends.

References rabbitmq/rabbitmq-server#1767
2019-06-06 10:46:31 +02:00
Diana Corbacho 7bfe632cb6 Cluster-wide MQTT client id tracking
Uses a ra cluster to keep the client id tracking information - in
the state of the ra machine.

If nodes are decommissioned from the RMQ cluster, the command
decommission_mqtt_node must be invoked first to disconnect the clients
on that node and remove the node from the ra cluster.

[#135330629]
2019-05-16 17:50:06 +01:00
Spring Operator 96006cd58b URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 1 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-21 03:17:58 -05:00
Spring Operator 852c61ea99 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* http://blog.listincomprehension.com/search/label/procket (200) with 1 occurrences could not be migrated:
   ([https](https://blog.listincomprehension.com/search/label/procket) result ClosedChannelException).
* http://dozzie.jarowit.net/trac/wiki/TOML (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/TOML) result SSLHandshakeException).
* http://dozzie.jarowit.net/trac/wiki/subproc (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/subproc) result SSLHandshakeException).
* http://e2project.org (200) with 1 occurrences could not be migrated:
   ([https](https://e2project.org) result AnnotatedConnectException).
* http://nitrogenproject.com/ (200) with 2 occurrences could not be migrated:
   ([https](https://nitrogenproject.com/) result ConnectTimeoutException).
* http://proper.softlab.ntua.gr (200) with 1 occurrences could not be migrated:
   ([https](https://proper.softlab.ntua.gr) result SSLHandshakeException).
* http://yaws.hyber.org (200) with 1 occurrences could not be migrated:
   ([https](https://yaws.hyber.org) result AnnotatedConnectException).
* http://choven.ca (503) with 1 occurrences could not be migrated:
   ([https](https://choven.ca) result ConnectTimeoutException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://fixprotocol.org/ (301) with 1 occurrences migrated to:
  https://fixtrading.org ([https](https://fixprotocol.org/) result SSLHandshakeException).
* http://erldb.org (UnknownHostException) with 1 occurrences migrated to:
  https://erldb.org ([https](https://erldb.org) result UnknownHostException).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://cloudi.org/ with 27 occurrences migrated to:
  https://cloudi.org/ ([https](https://cloudi.org/) result 200).
* http://erlware.org/ with 1 occurrences migrated to:
  https://erlware.org/ ([https](https://erlware.org/) result 200).
* http://inaka.github.io/cowboy-trails/ with 1 occurrences migrated to:
  https://inaka.github.io/cowboy-trails/ ([https](https://inaka.github.io/cowboy-trails/) result 200).
* http://ninenines.eu with 6 occurrences migrated to:
  https://ninenines.eu ([https](https://ninenines.eu) result 200).
* http://www.actordb.com/ with 2 occurrences migrated to:
  https://www.actordb.com/ ([https](https://www.actordb.com/) result 200).
* http://www.cs.kent.ac.uk/projects/wrangler/Home.html with 1 occurrences migrated to:
  https://www.cs.kent.ac.uk/projects/wrangler/Home.html ([https](https://www.cs.kent.ac.uk/projects/wrangler/Home.html) result 200).
* http://www.rabbitmq.com/mpl.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/mpl.html ([https](https://www.rabbitmq.com/mpl.html) result 200).
* http://www.rabbitmq.com/mqtt.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/mqtt.html ([https](https://www.rabbitmq.com/mqtt.html) result 200).
* http://www.rebar3.org with 1 occurrences migrated to:
  https://www.rebar3.org ([https](https://www.rebar3.org) result 200).
* http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* http://inaka.github.com/apns4erl with 1 occurrences migrated to:
  https://inaka.github.com/apns4erl ([https](https://inaka.github.com/apns4erl) result 301).
* http://inaka.github.com/edis/ with 1 occurrences migrated to:
  https://inaka.github.com/edis/ ([https](https://inaka.github.com/edis/) result 301).
* http://lasp-lang.org/ with 1 occurrences migrated to:
  https://lasp-lang.org/ ([https](https://lasp-lang.org/) result 301).
* http://saleyn.github.com/erlexec with 1 occurrences migrated to:
  https://saleyn.github.com/erlexec ([https](https://saleyn.github.com/erlexec) result 301).
* http://www.mozilla.org/MPL/ with 27 occurrences migrated to:
  https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) result 301).
* http://www.rabbitmq.com/man/rabbitmq-plugins.1.man.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/man/rabbitmq-plugins.1.man.html ([https](https://www.rabbitmq.com/man/rabbitmq-plugins.1.man.html) result 301).
* http://zhongwencool.github.io/observer_cli with 1 occurrences migrated to:
  https://zhongwencool.github.io/observer_cli ([https](https://zhongwencool.github.io/observer_cli) result 301).
2019-03-20 03:18:59 -05:00
Spring Operator c90ca44234 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 1 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 2 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 1 occurrences
2019-03-19 20:10:10 -05:00
Spring Operator 7e218211b8 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://www.apache.org/licenses/LICENSE-2.0 migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* http://www.rabbitmq.com migrated to:
  https://www.rabbitmq.com ([https](https://www.rabbitmq.com) result 200).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0
* http://maven.apache.org/xsd/maven-4.0.0.xsd
* http://www.w3.org/2001/XMLSchema-instance
2019-03-11 21:54:05 -05:00
Michael Klishin 48bac2500a Formatting 2019-02-03 20:09:41 +03:00
Michael Klishin 9caf40afa1 Cosmetics 2019-02-03 19:43:44 +03:00
Ryan Sandbach 08f97b9e6f New tests for retainer translation. 2019-02-01 00:21:10 -05:00
Arnaud Cogoluègnes ec65574e1f Add client ID to connection metadata
[#153246723]

Fixes #152
2019-01-22 10:30:25 +01:00
Michael Klishin 16d262f908 Additional tests extracted from rabbitmq/rabbitmq-stomp#130
The settings are already supported by this plugin.
2019-01-02 20:36:51 +03:00
Arnaud Cogoluègnes f1c1dbf30d Use Maven wrapper for Java test suite
This avoids depending on a local Maven.
2018-11-06 11:46:12 +01:00
Arnaud Cogoluègnes 9043d97f60 Fix Maven tests for CI environment
OpenJDK 1.8.0_181 on Debian-based distros introduces a bug that breaks
the Maven Surefire plugin (test plugin). This commit adds an argument to
the plugin configuration to fix this problem. It also bumps some Java
dependencies.
2018-11-06 11:31:18 +01:00
Jean-Sébastien Pédron 665abcdf2c Merge branch 'read-cert-name-from-cert-part2' 2017-12-15 12:06:13 +01:00
Jean-Sébastien Pédron be27eea7ac java_SUITE_data: Ignore target/ 2017-12-15 12:05:24 +01:00
Jean-Sébastien Pédron 2993a1426b java_SUITE: Get certificate name from the certificate itself
... instead of hard-coding the value. This fixes the testsuite when the
generated certificate configuration changes.

The same change was made to auth_SUITE in commit a11e96caa0.

[#153697697]
2017-12-15 12:02:36 +01:00
Jean-Sébastien Pédron ac32092fc2 Merge branch 'read-cert-name-from-cert' 2017-12-15 11:27:29 +01:00
Jean-Sébastien Pédron a11e96caa0 auth_SUITE: Get certificate name from the certificate itself
... instead of hard-coding the value. This fixes the testsuite when the
generated certificate configuration changes.

[#153697697]
2017-12-15 11:22:01 +01:00
Luke Bakken 60dfb72800 Fix tests broken by rabbitmq/rabbitmq_ct_helpers#17 2017-12-07 15:36:14 -08:00
Jean-Sébastien Pédron d3aaea7244 reader_SUITE: Increase timer in expect_publish() to 5 seconds
This reduces the risk of test failures.

(cherry picked from commit 50e842a200a482a67de6eaf67ab66774f63b48a1)
2017-08-11 14:39:00 +02:00
Jean-Sébastien Pédron 8a0d88cf1b reader_SUITE: Increase timer in expect_publish() to 5 seconds
This reduces the risk of test failures.
2017-08-11 12:27:40 +02:00
Michael Klishin 885daa1d6d Merge branch 'master' into rabbitmq-server-1229 2017-06-13 23:56:49 +03:00
Michael Klishin 3fda50bccd Make this test more robust
* Handle duplicate keys (see 82d1cb23e9, for instance)
 * Use maps since this test is in master only
 * Use eunit assertions that would print arguments on failures
2017-06-11 01:42:17 +03:00
Arnaud Cogoluègnes 81ab03c133 Add client_id as an topic authz expandable variable
References rabbitmq/rabbitmq-server#1229
2017-06-07 14:41:59 +02:00
Michael Klishin a1b46471fd Merge branch 'stable' 2017-04-02 22:02:20 +03:00
Michael Klishin fff8f52901 (c) year 2017-04-02 21:48:53 +03:00
Daniil Fedotov 897e194dc8 Config schema test for plugin
Part of [#141481501]
Moved from rabbitmq-server
2017-03-17 11:01:51 +00:00
Jean-Sébastien Pédron 96b51d2bc7 Merge branch 'stable' 2017-03-08 10:06:14 +01:00
Jean-Sébastien Pédron 034ac28159 reader_SUITE: Match the new `connection_coarse_metrics` field
The tuple returned by a read of `connection_coarse_metrics` contains a
new counter at the end. We ignore it but the pattern matching must be
updated.

Before this, the testcase failed with the following error:

    reader_SUITE:stats failed on line 147
    Reason: {badmatch,[{<19064.547.0>,70,30,5578,0}]}
2017-03-08 09:22:57 +01:00
Arnaud Cogoluègnes 2fd3da301b Merge branch 'stable' 2017-02-27 14:04:16 +01:00
Arnaud Cogoluègnes 9bb903010c Remove unused imports in Java test suite 2017-02-27 14:03:51 +01:00
Arnaud Cogoluègnes 45046566f5 Merge branch 'stable'
Conflicts:
	test/java_SUITE_data/src/test/java/com/rabbitmq/mqtt/test/MqttTest.java
2017-02-27 14:03:21 +01:00
Arnaud Cogoluègnes 2c2c24d18f Fix Java test build and test on Java 9
Need to use a recent version of Groovy in the Maven Groovy plugin.
Avoid using CGLIB-based features of Awaitility, as they don't work
on Java 9 (Awaitility is on its way to use Byte Buddy instead of CGLIB,
but no stable release yet).
2017-02-27 11:53:33 +01:00
Michael Klishin f383a3c023 Drive by change: squash a warning 2017-02-23 20:33:42 +03:00
Arnaud Cogoluègnes fba3782869 Check topic access when sending last will
The check is actually already done at the AMQP level, but this commit
adds an "upstream" check, a more specific warning message, and a test.

Fixes #114
2017-02-21 16:13:07 +01:00
Arnaud Cogoluègnes 61f38005df Polish proxy protocol test suite
Add call to rabbit_ct_helpers:testcase_started.

References rabbitmq/rabbitmq-server#589
2017-02-13 10:42:04 +01:00
Arnaud Cogoluègnes 1bc5c7afd2 Add support for proxy protocol
References rabbitmq/rabbitmq-server#589
2017-02-07 17:22:14 +01:00
Arnaud Cogoluègnes e0db62f69c Merge branch 'master' into rabbitmq-server-1085 2017-01-31 17:38:53 +01:00
Diana Corbacho c116f23d90 Merge branch 'stable' 2017-01-27 07:29:16 +00:00
Michael Klishin 4e55c07d1a Wording 2017-01-26 23:19:42 +03:00
Diana Corbacho 53e1d8e776 Notify recv_oct, send_oct, reductions and garbage_collection in core metrics 2017-01-26 16:15:08 +00:00
Michael Klishin b99d77d16f Merge branch 'stable' 2017-01-25 22:23:25 +03:00
Michael Klishin c70a8d3a97 Don't assume stats tables are empty
We don't need them to be; what we care about is that
in this particular test, no new entries are inserted.
2017-01-25 22:15:39 +03:00
Diana Corbacho 12f91458f0 Add test for handling invalid frames 2017-01-25 16:21:59 +00:00
Arnaud Cogoluègnes 96aaf35900 Add topic authorisation for consumption
Part of rabbitmq/rabbitmq-server#1085
2017-01-23 12:10:23 +01:00
Arnaud Cogoluègnes 85636953a4 Use check_topic_access on publishing
check_resource_access used to be called with
the MQTT topic as resource name and kind = topic.
It makes more sense now to call check_topic_access
with the exchange as resource name, kind = topic,
and routing key in the context.

References rabbitmq/rabbitmq-server#505
2016-12-29 16:34:19 +01:00
Michael Klishin 500b66087a Merge branch 'stable' 2016-12-20 01:39:05 +03:00
Michael Klishin 6d94828a8d Revert "Give global policies more time to propagate"
This reverts commit 4e3849b0c3.
2016-12-20 01:35:41 +03:00
Michael Klishin 8a23720840 Merge branch 'stable' 2016-12-20 01:17:45 +03:00
Michael Klishin 4e3849b0c3 Give global policies more time to propagate
Sigh, CI.
2016-12-20 01:13:01 +03:00
Michael Klishin cfcde1d143 Merge branch 'stable' 2016-12-20 00:50:04 +03:00
Arnaud Cogoluègnes 87628f9f51 Use binary for port-to-vhost mapping key
Behaves better as a JSON document key than an integer.

Fixes #111
2016-12-19 17:36:18 +01:00
Arnaud Cogoluègnes b8344cdc27 Map client connection vhost to a port
Fixes #111
2016-12-19 15:00:43 +01:00
Arnaud Cogoluègnes d1c2474a89 Merge branch 'stable' 2016-12-16 10:59:10 +01:00
Michael Klishin 2d3c004efb Merge branch 'stable' into rabbitmq-mqtt-73 2016-12-15 17:46:24 +03:00
Arnaud Cogoluègnes 8749233066 Merge branch 'stable' 2016-12-15 15:42:36 +01:00
Arnaud Cogoluègnes 7424551de0 Fix race condition in test 2016-12-15 15:38:42 +01:00
Arnaud Cogoluègnes 6d53781e64 Merge branch 'stable' 2016-12-15 14:23:55 +01:00
Arnaud Cogoluègnes 335997d140 Use clean sessions in last will retained test 2016-12-15 14:23:23 +01:00
Arnaud Cogoluègnes e37b8135b1 Merge branch 'stable'
Conflicts:
	test/java_SUITE_data/src/test/java/com/rabbitmq/mqtt/test/MqttTest.java
2016-12-15 12:50:16 +01:00
Arnaud Cogoluègnes 20d35a1482 Use awaitility for Java tests 2016-12-15 12:46:14 +01:00
Arnaud Cogoluègnes 2a9a6cb261 Add test case for cert user/vhost mapping
Fixes #73
2016-12-13 17:31:34 +01:00
Arnaud Cogoluègnes 7e03af30fd Introduce mqtt_default_vhosts global parameter
Fixes #73
2016-12-13 14:46:15 +01:00
Arnaud Cogoluègnes d424894dc6 Test connection fails when vhost not allowed for cert user 2016-12-12 10:17:29 +01:00
Arnaud Cogoluègnes 8f9e8489c2 Optionally map user certificate to virtual host
Use a global runtime parameter to map the DN of the certificate
to a virtual host.

Fixes #73
2016-12-09 16:48:47 +01:00
Jean-Sébastien Pédron b87baed8bb Do not use -include_lib() with own headers
This fixes the build outside of an Umbrella-like setup, ie. when
dependencies of this plugin are put into the `deps` subdirectory.
2016-12-08 18:07:13 +01:00
Jean-Sébastien Pédron 8216cb12f1 Merge branch 'stable' 2016-12-07 15:48:04 +01:00
Michael Klishin b3f2bcfaed Merge branch 'stable' into rabbitmq-mqtt-100 2016-12-06 18:54:29 +03:00
Arnaud Cogoluègnes b1627afe81 Gracefully close connections to non-existent virtual hosts
Return CONNACK 4 code when the virtual host doesn't exist.
The MQTT description for this return code states "The data in
the user name or password is malformed", which not exactly
accurate but better than a pending or abruptly closed connection.
The server logs also a more meaningful message.

Fixes #100
2016-12-06 16:09:50 +01:00
Michael Klishin dca3081a5d Merge pull request #107 from rabbitmq/rabbitmq-cli-121
A CLI command to list mqtt connections
2016-12-06 18:07:25 +03:00
Michael Klishin 4a6a231484 Cosmetics 2016-12-06 18:06:44 +03:00
Michael Klishin a077b95f86 Merge branch 'stable' 2016-12-06 17:56:21 +03:00
Daniil Fedotov f411a74e10 Test list_mqtt_connections command 2016-12-06 14:24:45 +00:00
Arnaud Cogoluègnes 388d949645 Support Erlang string vhosts in retainer supervisor
Fixes #86
2016-12-06 11:03:02 +01:00
Michael Klishin bc8e2541bd Merge branch 'stable' 2016-12-05 14:27:40 +03:00
Arnaud Cogoluègnes a7a0174a41 Retain last will message
Fixes #74
2016-12-05 11:05:30 +01:00
Daniil Fedotov 7cd6fdec7e Merge branch 'stable' 2016-09-28 11:39:54 +01:00
Daniil Fedotov c610ca1c0e Do not log java test output 2016-09-28 11:39:44 +01:00
Arnaud Cogoluègnes e0aac5b183 Merge branch 'stable' 2016-09-27 15:34:09 +02:00
Arnaud Cogoluègnes 46d0977209 Use quiet mode for Maven 2016-09-27 15:33:31 +02:00
Arnaud Cogoluègnes 7f43ea05d8 Merge branch 'stable' 2016-09-27 13:56:16 +02:00
Arnaud Cogoluègnes 2d442353ee Refactor Java tests
Use JUnit4-style tests, increase max-in-flight messages to make
tests more resilient, synchronize test variables.
2016-09-27 13:32:40 +02:00
Arnaud Cogoluègnes c076259000 Specify file format for client certificate
Use PKCS12 to load the KeyStore object, not JKS. Java 8
manages to load the certificate anyway, but not Java 6, nor Java  7.
2016-09-27 10:30:44 +02:00
Daniil Fedotov 9eab2c7704 Report java test result in test log 2016-09-26 13:45:05 +01:00
Daniil Fedotov abe00f3d1a Cleanup comments 2016-09-23 18:06:05 +01:00
Daniil Fedotov 507ef875ea test dir cleanup 2016-09-23 17:19:03 +01:00
Daniil Fedotov 493805fd95 Run tests via maven 2016-09-23 16:42:21 +01:00
Michael Klishin c510fef54a Merge branch 'stable' 2016-09-02 02:07:46 +03:00
Michael Klishin d318ca2fa3 Rename 2016-09-02 01:54:57 +03:00
Michael Klishin ee213084f8 Wording, naming 2016-09-02 01:33:34 +03:00
Daniil Fedotov e8ca3ac8ff test comments 2016-09-01 17:21:02 +01:00
Daniil Fedotov 4b688b9e63 Make MQTT authentication correspond with docs. Added tests 2016-09-01 16:54:51 +01:00
Daniil Fedotov e348357392 Test empty password login 2016-09-01 10:43:14 +01:00
Jean-Sébastien Pédron 59523f1832 java_SUITE: Fetch dependencies using Maven
Thus, we do not use to clone and build org.eclipse.paho.client.mqttv3,
nor we depend on a local clone of rabbitmq-java-client.

While here, move all java_SUITE-specific files to `java_SUITE_data`.
2016-08-31 13:54:28 +02:00
Jean-Sébastien Pédron 08c29be1cf java_SUITE: Fetch dependencies using Maven
Thus, we do not use to clone and build org.eclipse.paho.client.mqttv3,
nor we depend on a local clone of rabbitmq-java-client.

While here, move all java_SUITE-specific files to `java_SUITE_data`.
2016-08-31 10:15:21 +02:00
Michael Klishin 969f3e966f Merge branch 'stable' 2016-07-12 08:25:40 -07:00
kjnilsson b76cfbe5dc Move to common test
travis config
2016-07-12 12:46:11 +01:00
Michael Klishin 6c16d80527 Merge branch 'stable' 2016-04-25 08:31:30 -07:00
Michael Klishin 2c8eec7dc1 Update Paho Java git repo location 2016-04-25 08:22:13 -07:00
Daniil Fedotov 5c98b84a56 Merge branch 'stable' 2016-04-22 13:32:57 +01:00
Daniil Fedotov 2d2b8f96d8 Tests message redelivery when resuming session 2016-04-22 12:25:30 +01:00
Michael Klishin a72c9e14d2 Merge branch 'stable' 2016-03-05 11:27:29 +03:00
Michael Klishin 44389f778b In fact, even more 2016-03-05 11:21:00 +03:00
Michael Klishin 72bfeef88b Wait a bit more 2016-03-05 11:20:54 +03:00
Michael Klishin 9b7c29841b Cosmetics 2016-03-05 11:09:38 +03:00
Michael Klishin 706d82dafb Explain 2016-03-05 11:09:26 +03:00
Michael Klishin 4c5aecf0f0 skip_publishes => expect_publishes 2016-03-05 11:04:56 +03:00
Michael Klishin 1078f5787f Trailing ws 2016-03-05 11:01:20 +03:00
Daniil Fedotov 98cf125e39 Defer last receive after blocking 2016-03-04 20:33:01 +00:00
Michael Klishin c619f638ee Merge branch 'stable' 2016-03-03 14:38:16 +03:00
Daniil Fedotov 6b5de44f9c Tests for mqtt blocking 2016-03-02 16:57:48 +00:00
Daniil Fedotov d1685b08fd More tests to check QoS2 is not ignored 2016-01-27 12:05:08 +00:00
Daniil Fedotov 64f5911ec2 Downgrade publishes if QoS = 2 to QoS = 1 2016-01-12 18:02:37 +00:00
Michael Klishin 9ba1da7434 Update (c) info 2016-01-01 12:59:18 +03:00
Michael Klishin 51e887e52e Update test expectation 2015-12-18 16:32:26 +03:00
Michael Klishin 624a7741cf Merge branch 'colons-in-username' of https://github.com/lshift/rabbitmq-mqtt into lshift-colons-in-username 2015-11-28 20:42:22 +03:00
Loïc Hoguin 597eecdaf8 Remove unneeded TCP options from config in .app.src files 2015-11-26 14:01:42 +01:00
ash 001f4a1a01 add option to ignore colons in usernames 2015-11-19 11:36:24 +00:00
Jean-Sébastien Pédron 3441383d18 make tests: Pass certificates path down to test/Makefile
This allows ant to detect the certificates and enable the SSL tests.
2015-11-05 17:50:58 +01:00
Jean-Sébastien Pédron 9626e1fbe0 Merge branch 'master' into erlang.mk 2015-10-23 12:13:24 +02:00
Michael Klishin c15812ac44 merge stable into master 2015-10-21 20:18:33 +03:00
Jean-Sébastien Pédron e2d80945cf setup-rabbit-test.sh: Take rabbitmqctl location from environment 2015-10-21 14:30:37 +02:00
Jean-Sébastien Pédron 08b5c3a009 test/build.xml: Take Java client location from environment 2015-10-21 14:30:03 +02:00
Jean-Sébastien Pédron 9d5037344d Initial move to erlang.mk 2015-10-19 12:28:46 +02:00
Michael Klishin 1096f3182d Merge branch 'stable' 2015-09-22 12:38:31 +03:00
Michael Klishin 85f9f2df5b Two more warnings 2015-09-22 02:31:15 -07:00
Michael Klishin 3981be3e3d Squash a few warnings in tests 2015-09-22 02:26:22 -07:00
Giuseppe Privitera 340bb5d70b refactored tests to use rabbitmq_mqtt:env/1 2015-09-17 23:27:13 +01:00
Giuseppe Privitera 9039d7398b added .app file with some configuration used by tests 2015-09-17 23:26:05 +01:00
Giuseppe Privitera 1544360485 removed unused test 2015-09-17 23:23:49 +01:00
Giuseppe Privitera 0213ec24e9 use assertEqual instead of pattern matching 2015-09-17 15:40:10 +01:00
Giuseppe Privitera 578ac7169b coerce default_user & default_pass 2015-09-17 14:50:17 +01:00
Giuseppe Privitera 2b58ca1247 added unit tests 2015-09-17 14:26:22 +01:00
Michael Klishin 8712428268 Merge branch 'stable' 2015-05-24 04:55:07 +03:00
Michael Klishin 692c6a7060 (c) year 2015-05-24 04:54:58 +03:00
Michael Klishin b52aed4a69 Merge branch 'stable' 2015-05-14 17:19:24 +03:00
Michael Klishin d89eed50e9 Adapt to Java client API change in stable 2015-05-14 14:59:50 +03:00
Jean-Sébastien Pédron dad4ea314a Merge branch 'stable' 2015-05-07 13:02:46 +02:00
Jean-Sébastien Pédron aa6872bb5c test/Makefile: Use $MAKE instead of hard-coding "make"
This one was harmless but let's do this for consistency's sake.

References #23.
2015-05-07 13:01:13 +02:00
Jean-Sébastien Pédron 9e9c2dec8c Merge branch 'stable' 2015-05-06 19:13:42 +02:00
Jean-Sébastien Pédron 386bba589e Use $MAKE instead of hard-coding "make"
$MAKE is passed down by Umbrella's do-package.mk. This fixes the
testsuite on systems where "make" is not GNU make.

Fixes #23.
2015-05-06 19:09:27 +02:00
Michael Klishin e099bf21c0 Tests for retained messages 2015-04-26 04:51:30 +03:00
Simon MacMullen 379ecfd911 Simplify. Enforce always running SSL tests. Don't create global variables in the Makefile namespace. 2014-11-28 14:39:39 +00:00
Michael Klishin 073cc57dcb Don't require peer cert 2014-11-25 23:51:30 +03:00
Michael Klishin 0dc8b8e22d Require TLS certificate in TLS authentication tests
Otherwise we get platform-specific failures and even generic client exceptions.
This case is potentially valid but is likely to be really rare (if you use TLS,
you probably also authenticate, using credentials or the certificate).

In the original patch this scenario was expected to fail. We now go back
to square 1.
2014-11-25 23:44:42 +03:00
Michael Klishin b1147f355c Pick most recent TLS version available 2014-11-25 23:20:38 +03:00
Michael Klishin d68f2b063e Use TLS v1.1 because v1.2 is not available on CI machines 2014-11-25 21:46:23 +03:00
Michael Klishin df5eb6aa57 Certificate authencation needs to be enabled explicitly, as with STOMP
Using the same ssl_cert_login app key.
2014-11-24 21:22:09 +03:00
Michael Klishin 0e298907aa Make it clear that this test does not expect an authentication failure 2014-11-24 21:21:20 +03:00
Michael Klishin 089ef7e86f Rename TLS test package 2014-11-24 17:01:10 +03:00
Michael Klishin 6eca0b71f8 Only ignore test/build/ but not test/build.xml and test/build.properties 2014-11-24 13:13:27 +03:00
Michael Klishin cee8eb2fd8 Client MQTT authentication using x509 certificates
Original patch by Eric Rauer.
2014-11-21 14:54:33 +00:00
Matthias Radestock bc1cdd77d5 merge stable into default 2014-03-31 13:29:39 +01:00
Matthias Radestock 299bcc1d5b eliminate race in testConnectFirst test
the test was highly timing sensitive; it published 1000 messages and
expected one of those publishes to fail due to the socket getting
closed by the server when encountering the first publish. So if the
client was quick enough / the server slow enough, all the publishes
would go through before the server processed the first one and closed
the socket. Cue test failure.

The new test sends an mqtt 'ping' and waits for a response. Not only
is this non-racy and doesn't require any magic timouts, it also is a
better exercise of the server logic: A 'publish' on a connection which
hasn't seen a 'connect' will fail anyway, even w/o the server code in
place that detects the missing 'connect', since processing a 'publish'
requires an amqp client connection, which in turn is only established
on 'connect'. By contrast, a 'ping' does not require an amqp client
connection. Hence removing the "make sure we have seen a 'connect'"
logic now results in a 'ping' response being sent, which makes the
test fail, as expected.
2014-03-31 13:26:58 +01:00
Simon MacMullen 4e07b1d640 Update copyright for 2014 2014-03-17 17:25:23 +00:00
Simon MacMullen 2206e2ae64 Allow running tests on a Mac 2014-02-03 17:51:02 +00:00
Simon MacMullen 9bde9ce822 Revert part of f438760bff27 since the exception is now an IOException. 2013-10-03 11:34:09 +01:00
Emile Joubert 69b255af77 Propagate Erlang client API change 2013-09-24 11:24:21 +01:00
Emile Joubert 50f162ea0d Swap connect and setting callback 2013-07-31 15:28:22 +01:00
Emile Joubert 23a100db9a Merged stable into default 2013-07-31 13:57:31 +01:00
Emile Joubert 48fbca2834 Automatically subscribe when connecting 2013-07-26 17:43:25 +01:00
Simon MacMullen bb95f34e47 s/VMware/GoPivotal/g 2013-07-01 10:49:14 +01:00
Simon MacMullen 73d32f6c6b Specify the version of the paho MQTT client to use, and some API tweaks to use the latest version. Why not just use the version that used to work? Well, it required some non-standard ant stuff to build. 2013-04-15 16:38:10 +01:00
Emile Joubert f973d137c3 Update copyright 2013 2013-01-23 13:06:40 +00:00
Emile Joubert ad7d5bdbf0 Turn off file-based client persistence in tests 2012-11-13 11:30:17 +00:00
Emile Joubert 44d9fa8b17 Tests require Java AMQP 2012-11-12 13:35:35 +00:00
Emile Joubert 7a10b4a7ec Interoperability fixes 2012-11-05 20:30:45 +00:00
Emile Joubert b88a0e3373 Increase test delay 2012-09-25 09:52:41 +01:00
Emile Joubert 11c2e485ec Prefer https to git protocol for firewall reasons 2012-09-17 15:37:02 +01:00
Emile Joubert 03dc8b5849 Make tests run from umbrella and pass more reliably 2012-09-17 14:57:31 +01:00
Emile Joubert a53c389211 Remove implicit rules for compiling java 2012-08-10 10:16:15 +01:00
Emile Joubert c904f78b2e Run tests from Makefile 2012-08-09 18:55:45 +01:00
Emile Joubert d3f4a2dc24 Updates 2012-08-05 23:52:54 +01:00
Emile Joubert ec215b34bd Clean sessions, and anonymous connections 2012-07-16 14:57:31 +01:00
Emile Joubert f79bf51275 Tests 2012-07-05 18:08:23 +01:00