summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* quorum_queue_utils: wait_for_messages/2 now waits up to 30 secondsavoid-double-channel-count-decreaseJean-Sébastien Pédron2020-10-131-1/+1
| | | | | ... instead of 5 seconds. Hopefully, this should reduce the chance of failures in CI.
* per_user_connection_channel_tracking_SUITE: Wait for conditionsJean-Sébastien Pédron2020-10-131-29/+30
| | | | | | | | | ... instead of checking it just after the channel/connection was closed. The problem with closing those resources is that the metric may be updated after the close function returns. There the check is time-sensitive. Waiting for the expected counter value fixes the problem.
* many_node_ha_SUITE: Limit timetrap to 5 minutesJean-Sébastien Pédron2020-10-131-0/+5
|
* Merge pull request #2462 from rabbitmq/rabbitmq-management-844Michael Klishin2020-10-071-4/+8
|\ | | | | Several new functions for rabbit_alarms
| * Switch to new CT helpersrabbitmq-management-844Michael Klishin2020-10-061-4/+8
| |
* | Fix mixed-versions test assertionkjnilsson2020-10-071-10/+15
| | | | | | | | To wait for both new and old confirm message formats.
* | queue_type_SUITE setup fixkjnilsson2020-10-061-14/+14
|/
* Backwards compatibility fixeskjnilsson2020-10-051-1/+6
| | | | For classic queues mostly.
* Do not run queue_parallel agains stream queuekjnilsson2020-10-021-2/+1
| | | | As it does not support most of the features.
* Stream Queuekjnilsson2020-09-3017-159/+2193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an aggregated commit of all changes related to the initial implementation of queue types and on top of that the stream queue type. The varios commit messages have simply been included mostly un-edited below. Make rabbit_amqqueue:not_found_or_absent_dirty/1 visible For use in the stream plugin. Use bigger retention policy on max-age test Set coordinator timeout to 30s Handle coordinator unavailable error Handle operator policies as maps when checking if is applicable Add is_policy_applicable/2 to classic queues Ignore restart commands if the stream has been deleted It could happen that after termination some of the monitors are still up and trigger writer/replica restarts Policy support on stream queues Remove subscription events on stream coordinator Ensure old leaders are removed from monitors Introduce delay when retrying a failed phase Note that this ensures monitor is setup, there was a bug where no monitor was really started when re-trying the same phase Restart replicas after leader election instead of relying on old monitors Use timer for stream coordinator retries Fix stream stats for members/online Multiple fixes for replica monitoring and restart Ensure pending commands are appended at the end and re-run Ensure phase is reset with the state Remove duplicates from replica list Restart current phase on state_enter Remove unused import Ensure rabbit is running when checking for stream quorum Restart replicas Add a close/1 function to queue types So that we can get a chance of cleaning up resources if needed. Stream queues close their osiris logs at this point. fix compiler errors stream-queue: take retention into account When calculating ready messages metrics. Add osiris to the list of rabbit deps Retry restart of replicas Do not restart replicas or leaders after receiving a delete cluster command Add more logging to the stream coordinator Monitor subscribed processes on the stream coordinator Memory breakdown for stream queues Update quorum queue event formatter rabbit_msg_record fixes Refactor channel confirms Remove old unconfirmed_messages module that was designed to handle multiple queue fan in logic including all ha mirrors etc. Replaced with simpler rabbit_confirms module that handles the fan out and leaves any queue specific logic (such as confirms from mirrors) to the queue type implemention. Also this module has a dedicated test module. Which is nice. Backward compatibility with 3.8.x events Supports mixed version cluster upgrades Match specification when stream queue already exists Max age retention for stream queues Stop all replicas before starting leader election stream: disallow global qos remove IS_CLASSIC|QUORUM macros Ensure only classic queues are notified on channel down This also removes the delivering_queues map in the channel state as it should not be needed for this and just cause additional unecessary accounting. Polish AMQP 1.0/0.9.1 properties conversion Support byte in application properties, handle 1-bit representation for booleans. Use binary in header for long AMQP 1.0 ID Fix AMQP 1.0 to 0.9.1 conversion Fix test due to incorrect type Convert timestamp application properties to/from seconds AMQP 1.0 uses milliseconds for timestamp and AMQP 0.9.1 uses seconds, so conversion needed. Dialyzer fixes Handle all message-id types AMQP 1.0 is more liberal in it's allowed types of message-id and correlation-id - this adds headers to describe the type of the data in the message_id / correlation_id properties and also handles the case where the data cannot fit by again using headers. Resize stream coordinator cluster when broker configuration changes convert timestamp to and fro seconds user_id should be a binary message annotations keys need to be symbols stream-queue: default exchange and routing key As these won't be present for data written using the rabbitmq-stream plugin. Add exchange, routing key as message annotations To the AMQP 1.0 formatted data to enable roundtrip. Add osiris logging module config And update logging config test suite. Restart election when start of new leader fails The node might have just gone down so we need to try another one Only aux keeps track of phase now, as it might change if the leader election fails Stream coordinator refactor - all state is kept on the ra machine Ensure any ra cluster not a qq is not cleaned up Fixes to recovery and monitoring Add AMQP 1.0 common to dependencies Add rabbit_msg_record module To handle conversions into internal stream storage format. Use rabbitmq-common stream-queue branch Use SSH for osiris dependency Stream coordinator: delete replica Stream coordinator: add replica Stream coordinator: leader failover Stream coordinator: declare and delete Test consuming from a random offset Previous offsets should not be delivered to consumers Consume from stream replicas and multiple test fixes Use max-length-bytes and add new max-segment-size Use SSH for osiris dependency Basic cancel for stream queues Publish stream queues and settle/reject/requeue refactor Consume from stream queues Fix recovery Publish stream messages Add/delete stream replicas Use safe queue names Set retention policy for stream queues Required by the ctl command [#171207092] Stream queue delete queue fix missing callback impl Stream queue declare Queue type abstraction And use the implementing module as the value of the amqqueue record `type` field. This will allow for easy dispatch to the queue type implementation. Queue type abstraction Move queue declare into rabbit_queue_type Move queue delete into queue type implementation Queue type: dequeue/basic_get Move info inside queue type abstraction Move policy change into queue type interface Add purge to queue type Add recovery to the queue type interface Rename amqqueue quorum_nodes field To a more generic an extensible opaque queue type specific map. Fix tests and handle classic API response Fix HA queue confirm bug All mirrors need to be present as queue names. This introduces context linking allowing additional queue refs to be linked to a single "master" queue ref contining the actual queue context. Fix issue with events of deleted queues Also update queue type smoke test to use a cluster by default. correct default value of amqqueue getter Move classic queues further inside queue type interface why [TrackerId] Dialyzer fixes
* Move supervisor2_SUITE to rabbit_common (next to the module under test)Michael Klishin2020-09-301-128/+0
|
* erlfmt changeslrb-update-supervisorLuke Bakken2020-09-291-24/+25
|
* Add test for intrinsic supervisor2 typeLuke Bakken2020-09-292-83/+127
| | | | Part of rabbitmq/rabbitmq-common#411
* Merge pull request #2451 from rabbitmq/qq-consumer-prioritiesMichael Klishin2020-09-292-1/+106
|\ | | | | Quorum queue consumer priorities
| * Quorum queue consumer prioritiesqq-consumer-prioritieskjnilsson2020-09-252-1/+106
| | | | | | | | | | | | This switches the service queue inside rabbit_fifo from a normal queue to a priority queue such that consumers with a higher priority are favoured for service.
* | Update rabbit_fifo consumers test to exclude suspected down ones from countdcorbacho2020-09-281-1/+1
| |
* | maintenance_mode_SUITE: Skip leader election checkJean-Sébastien Pédron2020-09-252-7/+36
| | | | | | | | | | ... in `quorum_queue_leadership_transfer` if some `rabbit_fifo` machines have different versions.
* | per_user_connection_channel_limit_SUITE: Wait for channel/connection to ↵Jean-Sébastien Pédron2020-09-251-13/+13
|/ | | | | | | | terminate This is a follow-up to commit f95bb4a4b1468a05c69202a2e0e03d063bc248de which did the same thing for just a few cases. Now all similar cases are handled the same.
* Make maintenance mode tests that involve QQs conditionalMichael Klishin2020-09-231-8/+41
|
* Fix one more timing-sensitive per_user_connection_channel_limit suite testMichael Klishin2020-09-231-6/+22
|
* Test invariant: peek must not drain the queuedcorbacho2020-09-221-0/+2
|
* Quorum Queue Peek commandkjnilsson2020-09-222-1/+45
| | | | | | Allow peeking of messages into a quorum queue. This uses a dedicated aux command to peek at a message at the given 1-indexed position in the queue.
* Skip another mixed versions testkjnilsson2020-09-211-0/+9
| | | | as it cannot be made reliable.
* per_user_connection_channel_limit_SUITE: Wait for channel/connection to ↵Jean-Sébastien Pédron2020-09-211-5/+5
| | | | | | | | | | | | terminate ... `most_basic_cluster_connection_and_channel_count` testcases. `amqp_channel:close()` is a synchronous call in the AMQP client. However we verify the number of remaining channels/connections on the server side. This explains the fact that there might be a window of time where the server-side resources might not be completely cleaned up when the client-side calls return.
* quorum_queue_SUITE set lower aten poll intervalkjnilsson2020-09-211-1/+3
|
* Switch per_user suite to query feature flagkjnilsson2020-09-213-33/+45
| | | | | Instead of the environment to avoid running incompatible mixed versions tests.
* Ignore some tests when for mixed versionskjnilsson2020-09-183-10/+24
| | | | As they are not able to run.
* quorum_queue_SUITE test reliabilitykjnilsson2020-09-171-2/+16
| | | | For mixed versions.
* Add system time to unit testqq-reject-publishdcorbacho2020-09-141-1/+2
|
* Quorum queue 'Queue TTL' support.kjnilsson2020-09-073-14/+142
| | | | | | The quorum queue will track the timestamp of whenever a consumer was removed and periodically check if the queue should be deleted based on it's expiry configuration.
* Don't assert on message countkjnilsson2020-09-071-1/+1
| | | | | As depending on which is the current leader this may or may not be returned.
* rabbit_fifo test changekjnilsson2020-09-071-1/+3
|
* Skip more testskjnilsson2020-09-072-8/+51
|
* quorum_queue_SUITE skip 2 node tests for mixed versionskjnilsson2020-09-071-32/+38
|
* Skip test that cannot work with mixed machine versionskjnilsson2020-09-071-2/+7
| | | | Growing shrinking does not necessarily work in mixed versions.
* Switch to 3 node clusters instead of 2kjnilsson2020-09-073-3/+3
| | | | As this works better with mixed Ra machine versions
* Skip test in mixed modekjnilsson2020-09-071-40/+44
| | | | that cannot pass due to Ra machine versioning restrictions.
* Test fixeskjnilsson2020-09-071-5/+16
|
* Make some test suite 3 node instead of 2kjnilsson2020-09-073-12/+14
| | | | | | | QQs cannot be declared in two node clusters with different machine versions. This setup should be an anomaly so changing some suites to better represent sensible conigurations. This should also allow some mixed-versions tests to pass.
* test fixeskjnilsson2020-09-071-1/+2
|
* Implement reject_publish for QQskjnilsson2020-09-073-26/+166
| | | | | | | | | | | | | | The reject publish overflow strategy for quorum queues is an inexact implementation that relies on the cooperation of publishing channels. When a channel first wants to publish to a quorum queue it first issues a synchonous register_enqueuer command which will return the current queue overflow state as reject_publish if the queue is full. The queue will also notify any active enqueuers when it reaches the limit but will continue to accept any enqueues it receives after that. Once the queue size goes below 80% of the limit(s) the queue will again notify enqueuers that they can resume publishin inte the queue.
* rabbit_fifo: Fixes for move to lqueuekjnilsson2020-09-071-92/+89
| | | | | Also rename v0 state back to rabbit_fifo else it could never work with old state!
* rabbit_fifo: change messages map to queuekjnilsson2020-09-071-7/+30
| | | | This results in a lower memory use per message.
* rabbit_fifo machine version 1kjnilsson2020-09-071-0/+1395
| | | | | First commit in a series that will evolve the rabbit_fifo state machine into version 1.
* Adjustments for test flakesPhilip Kuryloski2020-09-031-2/+3
|
* Run dead lettering test cases sequentiallyJean-Sébastien Pédron2020-09-021-3/+4
| | | | | | Concourse has recently had a high rate of false positives at clustering stage. The suite still finishes in a very reasonable amount of time.
* per_vhost_connection_limit_SUITE: Use ↵Jean-Sébastien Pédron2020-09-021-5/+5
| | | | | | | | | | | | | | rabbit_connection_tracking:clear_tracked_connection_tables_for_this_node/0 ... instead of rabbit_connection_tracking:clear_all_connection_tracking_tables/0. They latter calls the former and the former exists in all release branches. This fixes the undef exception when running the testsuite with mixed-versions clusters. While here use rabbit_ct_broker_helpers:rpc_all() instead of having a loop to call rabbit_ct_broker_helpers:rpc().
* Rework a flaky testMichael Klishin2020-08-311-18/+3
|
* More per_user_connection_channel_limit suite massagingMichael Klishin2020-08-311-87/+177
| | | | to reduce sporadic failures.
* Cleanly close connections in this testMichael Klishin2020-08-311-4/+3
| | | | | Killing a local connection process makes the test flaky. For the purpose of this suite, a clean close is good enough.