summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright (year 2020)Jean-Sébastien Pédron2020-03-1075-75/+75
|
* dynamic_ha_SUITE: Increase the chance of concurrent rebalancesJean-Sébastien Pédron2020-03-091-3/+14
| | | | | | | | | | | | | | | | | | | | | | ... in `rebalance_multiple_blocked`. The testcase wants two rebalances to happen at the same time: the first one may succeed (but this is out of scope for this testcase) and the second one must be aborted with `{error, rebalance_in_progress}`. It looks like things are faster with Erlang 23 because the first rebalance is already finished when the second starts, probably due to internode communication being slower than rebalance (the two rebalances are triggered from the common_test node). This time, the testcase starts a function on the remote node which spawns two functions in parallel to request a rebalance. Everything being local, we increase the chance to have concurrent rebalances. We don't know the order of execution of the two functions, so we simply verify that one of them fails. This is still not 100% bullet proof, but should be ok.
* Add test that should failLuke Bakken2020-03-061-1/+24
| | | | | | | | Add code to block multiple queue rebalance operations, fix test Allow acquiring the rebalance lock prior to calling rabbit_amqqueue:rebalance Simplify queue rebalance code to always acquire the lock using the current process
* rabbit_fifo: change release cursor calculationrabbit-fifo-release-cursor-fixkjnilsson2020-03-051-0/+21
| | | | | | | | Release cursors are taken less frequently the more messages there are on queue. This changes how this is calculated to simply use the message count rather than some multiple of the currently captured release cursors. This is more consistent and doesn't depend on non snapshottable state.
* rabbit_fifo_prop: revert config changekjnilsson2020-03-041-1/+1
|
* rabbit_fifo_props: add tests that tests config changeskjnilsson2020-03-031-31/+120
| | | | Especially max_length changes and tests the max_length invariant.
* signal_handling_SUITE: New testsuite to check the signal handlers behaviorJean-Sébastien Pédron2020-03-031-0/+168
| | | | References #2244.
* lower size of property testkjnilsson2020-03-021-1/+1
|
* rabbit_fifo: release cursor effect orderingkjnilsson2020-03-022-3/+6
| | | | | | | Ensure release cursors are added to the end of the effects list rather than the front as there may be effects such as log effects that require log entries that may be truncated by the release cursor effect to be present.
* product_info_SUITE: New testsuite to check product name & version overridesJean-Sébastien Pédron2020-02-291-0/+168
| | | | References #2257.
* min length validator: handle passwordless users gracefullyMichael Klishin2020-02-291-1/+5
|
* Take snapshots when messages are returnedqq-dead-letter-bugkjnilsson2020-02-281-4/+3
| | | | | | and there is a delivery-limit in place. Also fix rabbit_fifo tests.
* Fix QQ dead letter crashkjnilsson2020-02-281-0/+16
| | | | | | that would occur when dead-lettering a message that was not kept in memory. At that point the dead lettering function failed as the message had not be restored from the Ra log.
* Merge pull request #2255 from rabbitmq/qq-remove-member-fixMichael Klishin2020-02-251-0/+19
|\ | | | | Split QQ remove member into two operations
| * quorum_queue suite: remove a couple of stray commentsMichael Klishin2020-02-251-2/+0
| |
| * Split QQ remove member into two operationskjnilsson2020-02-241-0/+21
| | | | | | | | | | | | | | | | | | To avoid not updating the amqqueue record if the server data delete part failed but the Raft cluster was still updated. Also add a function to repair the quorum queue queue type nodes in the amqqrecord if it should diverge from what the Ra cluster thinks. [#171434221]
* | Fix QQ crash recovery bugkjnilsson2020-02-251-4/+25
|/ | | | | | | | | When using dead letter handlers the state machine would crash when a prefix_msg was being dead-lettered on recovery. This handles this case and also fixes an issue where the incorrect initial release cursor interval would have been set when overriding the release cursor default. [#171463230]
* Catch and report errors when importing definitions concurrentlyMichael Klishin2020-02-192-1/+42
|
* unit_log_config_SUITE: Adapt after fixes to rabbit_lagerJean-Sébastien Pédron2020-02-101-74/+82
| | | | | | See: * commit 169eeeb426b1c71e5b4e81f8fa813cab9570247a * commit 15dfe7b1bf63c6f6b9940738b219f08bcc241cbd
* Move all RabbitMQ-specific environment variables to `rabbit_env`Jean-Sébastien Pédron2020-02-031-5/+14
| | | | | | | | | | The reading of `$NOTIFY_SOCKET` is also moved at the same time. This is in preparation of the work around start/stop status. There is an associated commit in rabbitmq-common to update `rabbit_env` and record the origin of each variable. [#170149339]
* Skip persistent cluster ID test for mixed version clustersMichael Klishin2020-02-021-11/+17
| | | | | As previous 3.7.x do not have the function the test relies on. Note that the change is otherwise safe for them.
* Introduce a persistent internal cluster IDMichael Klishin2020-01-301-3/+16
| | | | | | | | | | | That the operator cannot and are not supposed to control. The ID is cluster-wide and stored as a global runtime parameter to make sure it is replicated across all nodes. It is intentionally excluded from imported definitions because it is not meant to be reused. This ID would be useful in several features/plugins under development.
* Merge pull request #2211 from rabbitmq/unsupported-if-flags-delete-qqArnaud Cogoluègnes2020-01-221-1/+31
|\ | | | | Unsupported if_empty and if_unused flags for delete quorum queues
| * Unsupported if_empty and if_unused flags for delete quorum queuesdcorbacho2020-01-151-1/+31
| | | | | | | | [#167065717]
* | quorum_queue_SUITE: Remove an unused variableJean-Sébastien Pédron2020-01-171-1/+1
| |
* | unit_SUITE: Declare test plugins' dependenciesJean-Sébastien Pédron2020-01-171-1/+6
| | | | | | | | | | | | | | | | Those plugins are created at runtime. We just need to populate the list of `applications` they depend on. This list must include `rabbit`. This will be even required once #rabbitmq/rabbitmq-server#2212 is accepted.
* | Revert "unit_SUITE: Fix test plugin's dependencies"Jean-Sébastien Pédron2020-01-171-1/+1
| | | | | | | | | | | | rabbit_shovel_test is not a plugin in fact. This reverts commit 3cf8b6384a9986e227dac3552f1b4208731ed84a.
* | unit_SUITE: Fix test plugin's dependenciesJean-Sébastien Pédron2020-01-161-1/+1
|/ | | | | | | It should depend on `rabbit`. This will be even required once #rabbitmq/rabbitmq-server#2212 is accepted.
* Merge pull request #2210 from rabbitmq/filter-applicable-policiesMichael Klishin2020-01-151-1/+21
|\ | | | | Filter policies that cannot be applied to quorum queues
| * Filter policies that cannot be applied to quorum queuesdcorbacho2020-01-141-1/+21
| | | | | | | | | | | | | | | | | | Some policies, such as highly available, do not apply to all types of queues. Even though quorum queues ignores some policies, they're still listed as an applied policy on this type of queue. This commit ignores filters these policies when applied, so they'll never be listed on the wrong type of queue. [#169811193]
* | Merge pull request #2209 from rabbitmq/tomyouyou-tomyouyou-autoheal-lMichael Klishin2020-01-131-2/+3
|\ \ | | | | | | Autoheal: the "autoheal_safe_to_start" state transition is not guaranteed to arrive on time
| * | Make autoheal state transition timeout configurableMichael Klishin2020-01-111-2/+3
| |/ | | | | | | In continuation to #2208.
* | unit_log_config_SUITE: Take new `feature_flags` category into accountJean-Sébastien Pédron2020-01-131-0/+18
|/
* (c) bumpMichael Klishin2019-12-2928-28/+28
|
* Remove an assertion that doesn't make much sense post-#2195Michael Klishin2019-12-271-6/+2
| | | | and won't pass in mixed version cluster tests.
* Wait for virtual host recovery longer, ref #2195Michael Klishin2019-12-271-5/+5
|
* vhost_SUITE: update expectations post-#2195Michael Klishin2019-12-271-16/+12
| | | | | We need to find another way to screw virtual host recovery post-#2195.
* Cuttlefish schema: introduce socket_writer.gc_thresholdMichael Klishin2019-12-251-0/+7
| | | | References #2182, rabbitmq/rabbitmq-common#343.
* unit_inbroker_parallel_SUITE: Fix use of `?config()`Jean-Sébastien Pédron2019-12-161-1/+1
| | | | | | | This macro is used when the requested key always exists. If this is not the case, `rabbit_ct_helpers:get_config()` should be used. This fixes a warning reported by common_test.
* Merge pull request #2185 from rabbitmq/qq-aux-eval-changesKarl Nilsson2019-12-161-7/+4
|\ | | | | Update rabbit_fifo with Ra aux changes
| * Fix rabbit_fifo tests after aux eval/tick changesArnaud Cogoluègnes2019-12-161-7/+4
| |
* | clustering_management_SUITE: Adapt behavior to pre-prelaunch nodesJean-Sébastien Pédron2019-12-131-1/+12
|/ | | | | When testing mixed-versions clusters, we need to check what kind of node is node B, because we may have to restart it differently.
* Ensure list_local_quorum_queues workskjnilsson2019-12-121-3/+5
| | | | on both follower and leader nodes.
* Initial tests for rabbit_quorum_queue:list_with_minimum_quorum/0Michael Klishin2019-12-121-3/+36
|
* quorum_queue_SUITE: Verify rabbit_ct_helpers:run_steps() return valueJean-Sébastien Pédron2019-12-121-35/+50
| | | | | | ... and skip the testscases in case of an error. Remove trailing whitespaces while here.
* rabbit_lager: Use log levels from prelaunch contextJean-Sébastien Pédron2019-12-111-137/+137
| | | | | Those log levels, coming from the process environment, take precedence over whatever is configured.
* Move most of shell scripts to Erlang codeJean-Sébastien Pédron2019-12-115-30/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A large part of the rabbitmq-server(8) and CLI scripts, both Bourne-shell and Windows Batch versions, was moved to Erlang code and the RabbitMQ startup procedure was reorganized to be closer to a regular Erlang application. A new application called `rabbitmq_prelaunch` is responsible for: 1. Querying the environment variables to initialize important variables (using the new `rabbit_env` module in rabbitmq-common). 2. Checking the compatibility with the Erlang/OTP runtime. 3. Configuring Erlang distribution. 5. Writing the PID file. The application is started early (i.e. it is started before `rabbit`). The `rabbit` application runs the second half of the prelaunch sequence at the beginning of the application `start()` function. This second phase is responsible for the following steps: 1. Preparing the feature flags registry. 2. Reading and validating the configuration. 3. Configuring logging. 4. Running the various cluster checks. In addition to this prelaunch sequence, the `rabbit` application start procedure ends with a "postlaunch" sequence which takes care of starting enabled plugins. Thanks to this, RabbitMQ can be started with `application:start(rabbit)` as any other Erlang application. The only caveats are: * Mnesia must be stopped at the time `rabbit_prelaunch` is started, and must remain stopped when `rabbit` is started, to allow the Erlang distribution setup and cluster checks. `rabbit` takes care of starting Mnesia. * Likewise for Ra, because it relies on the `ra` application environment to be configured. Transitioning from scripts to Erlang code has the following benefits: * RabbitMQ start behavior should be identical between Unix and Windows. Also, features should be on par now. For instance, RabbitMQ now writes a PID file on Windows, like it always did on Unix-based systems. * The difference between published packages and a development environment are greatly reduced. In fact, we removed all the "if this is a dev working copy, then ..." blocks. As part of that, the `rabbit` application is now treated like its plugins: it is packaged as an `.ez` archive and written to the `plugins` directory (even though it is not technically a plugin). Also in a development copy, the CLI is copied to the top-level project. So when testing a plugin for instance, the CLI to use is `sbin/rabbitmqctl` in the current directory, not the master copy in `rabbit/scripts`. * As a consequence of the previous two points, maintaining and testing on Windows is now made easy. It should even be possible to setup CI on Windows. * There are less issues with paths containing non-US-ASCII characters, which can happen on Windows because RabbitMQ stores its data in user directories by default. This process brings at least one more benefit: we now have early logging during this prelaunch phase, which eases diagnostics and debugging. There are also behavior changes: * The new format configuration files used to be converted to an Erlang-term-based file by the Cuttlefish CLI. To do that, configuration schemas were copied to a temporary directory and the generated configuration file was written to RabbitMQ data directory. Now, Cuttlefish is used as a library: everything happens in memory. No schemas are copied, no generated configuration is written to disk. * The PID file is removed when the Erlang VM exits. * The `rabbit_config` module was trimmed significantly because most of the configuration handling is done in `rabbit_prelaunch_conf` now. * The RabbitMQ nodename does not appear on the command line, therefore it is missing from ps(1) and top(1) output. * The `rabbit:start()` function will probably behave differently in some ways because it defers everything to the Erlang application controller (instead of reimplementing it).
* unit_inbroker_non_parallel_SUITE: Skip log file test if dir writableJean-Sébastien Pédron2019-12-051-8/+21
| | | | | | | | | If the supposedly non-writable directory is writable (e.g. we are running the testsuite on Windows as Administrator), we skip this test. On Unix, we now use `/` as the non-writable directory because `/var/empty` may not exist. For instance, this is the case on Debian Stretch AWS EC2 image.
* Merge pull request #2176 from rabbitmq/duplicated-consumers-metricMichael Klishin2019-11-291-1/+20
|\ | | | | Remove duplicated consumers metric in quorum queues
| * Take consumers from `handle_tick` arguments, as stats from `infos` are not ↵dcorbacho2019-11-291-4/+4
| | | | | | | | yet updated