Commit Graph

287 Commits

Author SHA1 Message Date
Simon MacMullen 02f59b44e9 Cycle detection for bindings too, plus a test. 2014-01-30 11:17:24 +00:00
Simon MacMullen ef6f12fef0 Be more general about reporting failed command executions - ?assertCmd() doesn't tell you anything. 2014-01-29 15:21:44 +00:00
Simon MacMullen 299829365a Update nomenclature in tests too... 2013-12-09 11:18:03 +00:00
Simon MacMullen 36402c280b Tests need renaming too. 2013-09-18 12:52:04 +01:00
Simon MacMullen 94e4d3293d Rename a couple of modules that are exchange-specific. 2013-09-18 12:23:28 +01:00
Simon MacMullen d374681d9e Merge in default 2013-09-05 12:25:38 +01:00
Simon MacMullen f5b3a9000e Merge default 2013-09-04 14:49:23 +01:00
Simon MacMullen e4addbbc5e API change 2013-09-03 12:50:09 +01:00
Simon MacMullen 616c4ce764 If we fail to start a second broker, let's say why 2013-09-03 12:46:11 +01:00
Simon MacMullen cebd0cc414 Merge in default. 2013-09-02 16:36:20 +01:00
Simon MacMullen b26877f55d Uh, post bug 25707 that test makes no sense, and fails frequently. 2013-09-02 16:31:32 +01:00
Simon MacMullen ec17942ffc Merge default 2013-08-16 11:16:54 +01:00
Simon MacMullen b5d5996746 Update to new queue decorator API, and thus re-enable a disabled test. 2013-07-05 17:27:27 +01:00
Simon MacMullen ce515d3310 s/VMware/GoPivotal/g 2013-07-01 10:49:12 +01:00
Simon MacMullen b81e3f093d Fix various bugs in status updates, tests now pass again. 2013-06-28 16:46:23 +01:00
Simon MacMullen ceadd6d480 Add a (simple) restart test and also test status (although that part fails right now). 2013-06-27 16:53:26 +01:00
Simon MacMullen 0cd78b887b Oops, unbreak tests 2013-06-12 14:51:47 +01:00
Simon MacMullen ae5907e342 A bunch more tests, and a (temporary) fix thus discovered. 2013-06-05 14:36:11 +01:00
Simon MacMullen 1d4c99e2d6 Disable this test until we are much further along. 2013-06-05 11:56:24 +01:00
Simon MacMullen 844ff645b6 Allow specifying a different queue name for the upstream, remove use of a fake exchange, start to write tests, remember to sepcify drain. 2013-06-04 15:46:43 +01:00
Simon MacMullen 8deff01da2 Add a test of changing the policy for a federated exchange while keeping it federated. 2013-04-16 14:54:41 +01:00
Simon MacMullen 174b3de97c Stable to default 2013-03-12 12:46:08 +00:00
Simon MacMullen 65a15bbdfa Oops 2013-03-12 12:34:20 +00:00
Simon MacMullen 4df3ebd76a Also test that we don't unescape wrongly. 2013-03-12 10:31:11 +00:00
Simon MacMullen 855d654a8f Rewrite to use uri_parser:parse/2 and add unit tests. 2013-03-12 10:27:59 +00:00
Simon MacMullen 75ae97434a Strip out credentials when adding URIs to x-received-from header. 2013-03-11 18:44:57 +00:00
Simon MacMullen 6e9e3f4842 Slightly less cheap-and-cheerful test for multiple URIs.
"It's all right... to be mean" (to your connection pids).
2013-02-05 13:35:20 +00:00
Simon MacMullen 25dbc11929 Rather fiddly refactoring to split up #upstream into #upstream{} and #upstream_params{} - the latter being instantiated by the link process, and representing a choice having been made amongst the URIs in the #upstream{}. So we now should fail over randomly to a new upstream from the set. 2013-02-04 17:11:39 +00:00
Emile Joubert 5bd7b6461e Update copyright 2013 2013-01-23 11:43:00 +00:00
Simon MacMullen ab318fd339 Merge default! 2012-10-26 16:34:31 +01:00
Emile Joubert 19ba439616 Correct regexp patterns for tests 2012-10-24 11:40:24 +01:00
Emile Joubert b724334ad3 Merged bug25142 into default 2012-10-23 12:45:55 +01:00
Simon MacMullen cf8ff217e5 s/key/name/ 2012-10-22 15:06:37 +01:00
Simon MacMullen d5f1cee81d And add a test for binding propagation. 2012-10-18 16:27:47 +01:00
Emile Joubert 8b3e62d36f Greater workingness 2012-10-11 18:07:02 +01:00
Emile Joubert 39d05de40f Tidying 2012-10-11 10:27:41 +01:00
Emile Joubert f70ac3153a Changes to policy setting interface 2012-10-09 17:21:20 +01:00
Emile Joubert 64dfa77abc Updated policy validation 2012-10-05 18:17:03 +01:00
Tim Watson 67d3e7b60b be a bit more careful to ensure nodes are not already active 2012-10-03 16:43:38 +01:00
Matthias Radestock 13b191c689 remove superfluous operator 2012-09-14 18:55:21 +01:00
Emile Joubert add2e8591f user-id tests should use JSON format 2012-09-14 17:24:08 +01:00
Emile Joubert b12697b303 Merged default 2012-09-14 12:13:42 +01:00
Emile Joubert 4cfe3272f3 Merged bug25072 2012-09-13 17:37:31 +01:00
Matthias Radestock 918c8ffd54 increase binding propagation waiting time, to see whether it reduces ci failure rate 2012-09-13 15:24:14 +01:00
Matthias Radestock 82abc37c26 try tracking down ci failures 2012-09-13 13:32:35 +01:00
Francesco Mazzoli 9eddd1d13e modified timeout by mistake 2012-09-13 12:20:02 +01:00
Emile Joubert 823a6cdb12 Merged default 2012-09-13 12:14:38 +01:00
Francesco Mazzoli 78de6dadda update the federation tests to use json 2012-09-11 15:00:22 +01:00
Simon MacMullen 9171406883 Make dyn. more obviously a prefix, and remove the priority here too. 2012-09-07 15:29:49 +01:00
Simon MacMullen e2bc04709c Add trust-user-id field to upstreams, and test it. 2012-09-07 13:14:35 +01:00
Emile Joubert e51d20fb8e Update federation tests for regex policies 2012-09-06 16:47:36 +01:00
Simon MacMullen da7663b62b Rename "federation connection" to "upstream", underscores to hyphens in everything parameter-related. 2012-07-04 12:57:48 +01:00
Simon MacMullen b14dac68ef Make all these set_parameter tests more readable. 2012-06-11 16:13:15 +01:00
Simon MacMullen 4d0cc84b00 Simple test for federating / unfederating exchanges at runtime. 2012-06-11 15:51:04 +01:00
Simon MacMullen d22cbc616b Get the tests passing again (TODO: write more tests!). This necessitates a bit of rejigging of interfaces (mostly back closer to where it is on default). Note that the validation test is no longer needed :-) 2012-06-08 15:16:40 +01:00
Emile Joubert c99c7da468 Merged bug24695 into default 2012-05-28 17:28:01 +01:00
Simon MacMullen b4bef56044 Don't bother with this tiemout, eunit imposes a timeout on tests anyway and this just provides another way for things to fail when CI is slow. 2012-05-23 14:49:11 +01:00
Simon MacMullen c7e1a46999 Globally raise timeouts since CI is currently running so slowly that even unit tests are timing out. Hey, it worked for management. 2012-05-16 11:20:28 +01:00
Simon MacMullen 40191251a7 Update the tests to work again (and test direct connections too). 2012-04-24 14:12:49 +01:00
Simon MacMullen 7f5e20067e Allow exchanges to point to upstream sets that do not exist, and upstream sets to point to connections that do not exist. And tests to match. 2012-04-11 12:07:04 +01:00
Simon MacMullen 7d297e6004 Test dynamic configuration a bit. 2012-04-10 18:09:56 +01:00
Simon MacMullen c81e107e2c That's obsolete. 2012-04-10 16:05:28 +01:00
Simon MacMullen 065c11bce0 Damnit 2012-04-05 15:56:29 +01:00
Simon MacMullen c03564fc92 That's now a binary 2012-04-05 15:33:00 +01:00
Simon MacMullen a75f498504 No point in testing statically configured exchanges any more 2012-04-05 15:32:43 +01:00
Simon MacMullen fbb3ef1fb3 Switch to configuring tests via the new config mechanism. 2012-04-05 15:31:54 +01:00
Simon MacMullen 8debf06129 Merge in default 2012-03-23 13:45:27 +00:00
Simon MacMullen 2d1573d652 Fix most tests. 2012-03-23 13:05:06 +00:00
Simon MacMullen 90239e86ad Simple test for the legacy case where we connect to an upstream that does not know about the x-federation-upstream exchange. 2012-03-13 16:38:59 +00:00
Simon MacMullen 2e7f278554 Merge in default 2012-02-29 16:26:17 +00:00
Simon MacMullen 0857e29636 Use rabbit_basic:append_table_header. This means we need to lose a test, but that code is now tested byt the DLX tests. 2012-02-27 17:46:27 +00:00
Emile Joubert fb9cdefe12 Merged bug24624 into default 2012-02-06 16:13:36 +00:00
Emile Joubert dd68ca5fd7 Increase timeout to allow tests to pass 2012-02-03 14:58:09 +00:00
Simon MacMullen f566c42857 Move rabbit_misc:nodeparts/1 and rabbit_misc:makenode/1 into rabbit_nodes 2012-02-02 14:36:16 +00:00
Emile Joubert 6d297855d5 Update copyright 2012 2012-02-02 14:07:58 +00:00
Simon MacMullen 4444dfe094 Merge from default 2011-11-17 12:00:57 +00:00
Simon MacMullen 38fb367086 Remove debugging aid added in 9bbaae483028. 2011-10-10 15:30:02 +01:00
Simon MacMullen 7dc45636fc This is failing sometimes in CI, but I can't replicate it here, so let's get some more information out. 2011-10-07 12:02:34 +01:00
Rob Harrop c82a26f0b5 Merge bug24095 into default 2011-08-24 11:36:06 +01:00
Simon MacMullen 74cc517eac This is quite lame, but it does reduce the likelihood of random failures here. On my machine at least :) 2011-08-19 14:13:21 +01:00
Simon MacMullen c549b5df38 Update to use new rabbitmqctl wait form. Unfortunately this is fiddly because:
* Getting the pid file from $$ in the script isn't going to work if we use
  erl -detached since, err, it'll start a new process.

* If we background the process then eunit's ?assertCmd macro seems to just
  hang. I tried redirecting stdout and stderr, setsid and nohup. Nothing
  worked.

* So we have to use os:cmd rather than ?assertCmd. And that doesn't let you
  get the status code out! So we have to work around that too...
2011-07-20 16:55:30 +01:00
Simon MacMullen f89ab6043e For each test, check the status is correct after bringing up some exchanges. And fix bugs found as a consequence:
* keypos is needed in our new table declaration
* we should delete status records when deleting exchange
* add upstream_exchange to status to uniquify

Yes, tests are good, aren't they?
2011-07-15 17:40:22 +01:00
Matthias Radestock 7a4344617c merge bug23900 into default 2011-07-11 16:40:38 +01:00
Simon MacMullen 4dacf6d0fd suffix/2. 2011-07-11 14:29:00 +01:00
Simon MacMullen 38779ccf1f Run binding recovery test on hare to work round bug 24256 2011-07-11 14:02:58 +01:00
Simon MacMullen 061ee38430 One of these just timed out on CI, I *think* for no good reason. 2011-07-08 11:36:26 +01:00
Simon MacMullen 6bb7029078 Test scratch space management in binding_recovery_test also. 2011-07-07 16:37:47 +01:00
Simon MacMullen 26d56c4d2b Merge in default 2011-07-07 16:09:30 +01:00
Simon MacMullen e84ba0756f Port 1f66209756c5 to default from bug 24249 2011-07-07 16:07:10 +01:00
Simon MacMullen 246391e11d Test our handling of scratch space. 2011-07-07 15:39:45 +01:00
Simon MacMullen 78f845ecd0 Merge in default 2011-07-07 14:40:20 +01:00
Simon MacMullen 916e3f8bdc Test binding recovery with serialise_events on, since it's hard for rabbitmq-server to do that. 2011-07-06 16:31:34 +01:00
Simon MacMullen dfb2c458e8 Reduce the scope #exchange{}s get to explore. 2011-07-06 14:55:28 +01:00
Simon MacMullen 20d3f0c511 Attempt to make tests more reliable. 2011-06-24 17:27:27 +01:00
Simon MacMullen 45484c82b0 Run tests without pwd sensitivity, thus fix "make test" in the public umbrella. 2011-06-22 17:52:04 +01:00
Simon MacMullen 6f58f6355e We don't need such long waits now. 2011-06-22 12:21:37 +01:00
Simon MacMullen 7e844748cd Reorganise the 100ms delays we use to get round asynchronicity of bindings going upstream. 2011-06-22 12:02:04 +01:00
Matthias Radestock 9698da002d cosmetic 2011-06-21 19:04:39 +01:00
Matthias Radestock a83ae8ba79 cosmetic 2011-06-21 17:46:43 +01:00
Simon MacMullen 6cadc015ba Rename upstream_set argument to upstream-set. 2011-06-21 11:32:45 +01:00
Simon MacMullen 54497b3e0f Test max_hops by building a ring with three brokers. 2011-06-16 17:56:23 +01:00
Simon MacMullen 18fbdfb62e Rename x-forwarding to x-received-from, remove protocol from it. 2011-06-16 13:23:36 +01:00
Simon MacMullen 153be18672 Rejig the configuration to go through an additional layer of indirection so that exchange arguments can plausibly be immutable, and to get rid of the confusing merging.
Also fix the insidious default queue expiry that had been hiding.
2011-06-03 18:09:23 +01:00
Simon MacMullen 04e83ea49a Fix the command-queuing logic. This requires a number of changes:
*  Actually fix the logic: keep track of the next expected
   serial. Queue up commands that come after it, and ignore ones
   before it. Take initial value of the serial in the same tx as
   we execute rabbit_binding:list_for_source.

*  Introduce a function in rabbitmq-server to peek the next value
   of an exchange's serial to support this.

*  Make (un)binding transmission asynchronous, and note it in the
   README. This is the right thing to do, but unfortunately it
   means we need to insert sleep()s all over the place in the
   test suite. Ah well.

*  Make remove_bindings into a single message sent to each link,
   rather than a bunch of (remove_binding)s.

*  Make add_bindings always send a message to each link, even if
   it does nothing, to eat up the serial number.

*  Make the serialisation unit test actually declare exchanges.
2011-06-01 16:38:39 +01:00
Simon MacMullen 4cd0c697e1 Add a (currently stupid) test to ensure we serialise the add / remove bindings calls properly. 2011-05-31 13:51:12 +01:00
Simon MacMullen faff573a89 This is not great, but necessary to run the tests on something other than an Optiplex. Still faster than many other test suites... 2011-05-27 11:57:55 +01:00
Simon MacMullen f6ae916866 Update now that things have been merged to default 2011-05-17 14:44:00 +01:00
Simon MacMullen 87e333be56 Build system changes. 2011-04-12 12:18:42 +01:00
Simon MacMullen a288f25ee1 updating use of amqp_client exit reasons 2011-03-29 17:41:43 +01:00
Simon MacMullen ad8428d9fc This makes tracking down bugs rather easier. 2011-03-23 12:26:14 +00:00
Simon MacMullen 1081f99586 Split up smart_unbind_test and find a way to test that unbinds get sent upstream. 2011-03-23 11:43:43 +00:00
Simon MacMullen 8f5bf686b8 A bit more general and hopefully clearer. 2011-03-23 11:33:24 +00:00
Simon MacMullen 8cb922f1c2 Refactor tests a bit. 2011-03-23 11:11:26 +00:00
Simon MacMullen 11c8fa7b9a The previous commit was buggy because we never added bindings. Add more test to catch that, fix it, and optimise add_binding as well. 2011-03-22 16:35:25 +00:00
Simon MacMullen 3cd4b78949 Rename rabbit_federation_exchange_upstream to rabbit_federation_link. 2011-03-21 11:41:57 +00:00
Simon MacMullen 56bc814d8c Remove URIs from configuration. 2011-03-03 14:13:05 +00:00
Simon MacMullen 693b9b800e Reset bindings on connect. 2011-03-02 13:13:30 +00:00
Simon MacMullen 49e035243d Fix various bugs:
Make supervision more correct
Make shutdown work
Fix durability in tests
2011-03-01 11:01:42 +00:00
Simon MacMullen c3031441b1 Split up such that we have one process per (upstream, downstream) combination. This mostly works, but there's something weird with the supervision hierarchy keeping the Erlang VM alive when rabbit_federation_exchange_upstream is not temporary. 2011-02-28 18:10:01 +00:00
Simon MacMullen 86d41ae23e Create the exchange process at exchange recovery. This means moving the processes / supervisor under the rabbit application, which means making them be able to run in a dumb state when the amqp_client is not yet available, which means splitting code out into a bunch of modules, etc etc. 2011-02-23 16:47:50 +00:00
Simon MacMullen 1cdaeef21f Use rabbitmqctl wait 2011-02-22 17:02:15 +00:00
Simon MacMullen 6a9a6e896e Don't allow binding, unbinding or publishing loops, by the simple expedient of only allowing things to cross one hop. 2011-02-22 16:29:42 +00:00
Simon MacMullen 5f0cd4d884 Add forwarding information in a header. 2011-02-18 16:27:12 +00:00
Simon MacMullen 40b80e9f8a Only transmit unbinds upstream if it's the last with the same {Source, Key, Args}. 2011-02-18 13:40:10 +00:00
Simon MacMullen cdb9c1e20d In multiple_downstreams_test messages can arrive in any order. Deal with that and stop being racy. 2011-02-18 12:51:51 +00:00
Simon MacMullen 45f9aad9f1 Conserve vertical space. 2011-02-18 12:46:31 +00:00
Simon MacMullen 2efd415f87 Delete upstream queues when exchange is deleted. Remove childspec from supervisor when exchange is stopped. 2011-02-18 11:59:20 +00:00
Simon MacMullen 6e4d1f6d81 Validate args 2011-02-17 18:14:06 +00:00
Simon MacMullen a3bcddc176 Delete and recreate upstream queue when creating transient exchange 2011-02-17 17:08:08 +00:00
Simon MacMullen 6c9e11df7c Turns out e2e just works, but let's prove that (and note that we're not completely efficient here, we send all msgs that get routed to the exchanges bound to the federation exchange, regardless of whether they get routed anywhere after that). 2011-02-17 12:49:26 +00:00
Simon MacMullen 5e573553ee Handle the upstream broker going down. 2011-02-15 18:25:21 +00:00
Simon MacMullen c1cf725a5d Grab the port number from URLs, add a test across two brokers. 2011-02-15 14:30:42 +00:00
Simon MacMullen 690eb40534 Revert "readable name" for the time being as it's not unique enough. And add the test that let me find that. 2011-02-15 12:28:35 +00:00
Simon MacMullen 011c19dfe1 Separate out the config based exchange tests entirely. 2011-02-15 12:15:23 +00:00
Simon MacMullen 537f7b9c69 Multiple upstreams. 2011-02-11 14:44:37 +00:00
Simon MacMullen 3b2c67075e Refactor tests, test configuration, allow more than one federation exchange per broker(!) 2011-02-11 13:33:32 +00:00
Simon MacMullen e8bd411781 The simplest possible test. 2011-02-11 12:06:27 +00:00