Commit Graph

51 Commits

Author SHA1 Message Date
Falcon Taylor-Carter 4dab02289d Add tests for duplicate binding scenarios 2021-10-18 23:25:06 -04:00
Michael Klishin 52479099ec
Bump (c) year 2021-01-22 09:00:14 +03:00
Jean-Sébastien Pédron 1cfb526a48 rabbit_exchange_type_consistent_hash_SUITE: Bump wait_for_confirms to 5 minutes
We still get failures in CI. Let's see how it goes with a very large
timeout value.
2020-11-04 17:29:49 +01:00
Jean-Sébastien Pédron de1cccff7a rabbit_exchange_type_consistent_hash_SUITE: Use ?assertEqual instead of matching
The reported error will provide more information.
2020-11-04 17:28:42 +01:00
Jean-Sébastien Pédron cd6c8e25cf rabbit_exchange_type_consistent_hash_SUITE: Remove trailing whitespaces 2020-11-04 17:28:18 +01:00
Jean-Sébastien Pédron c7354f0f45 rabbit_exchange_type_consistent_hash_SUITE: Wait for confirms for 60 seconds
Switching from 5000 seconds to 5 seconds, after we discovered that this
API expects seconds instead of milliseconds, made the wait too short.
2020-11-04 11:06:13 +01:00
Luke Bakken 868bd77859 wait_for_confirms timeout is in seconds
References rabbitmq/rabbitmq-erlang-client#138

cc @dumbbell
2020-11-02 10:49:50 -08:00
dcorbacho 5d348bd3a1 Switch to Mozilla Public License 2.0 (MPL 2.0) 2020-07-11 19:45:03 +01:00
Michael Klishin 2d0adc176b Integration tests for #45 2020-06-12 13:00:21 +03:00
Jean-Sébastien Pédron f73587775a Update copyright (year 2020) 2020-03-10 16:08:09 +01:00
Michael Klishin 8c28dff573 (c) bump 2019-12-29 05:50:26 +03:00
Spring Operator f1ac305a24 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://michaelnielsen.org/blog/consistent-hashing/ (200) with 1 occurrences could not be migrated:
   ([https](https://michaelnielsen.org/blog/consistent-hashing/) result SSLHandshakeException).
* 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://rubybunny.info (200) with 1 occurrences could not be migrated:
   ([https](https://rubybunny.info) result AnnotatedConnectException).
* http://www.martinbroadhurst.com/Consistent-Hash-Ring.html (200) with 1 occurrences could not be migrated:
   ([https](https://www.martinbroadhurst.com/Consistent-Hash-Ring.html) 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://en.wikipedia.org/wiki/Consistent_hashing with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Consistent_hashing ([https](https://en.wikipedia.org/wiki/Consistent_hashing) 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/plugins.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/plugins.html ([https](https://www.rabbitmq.com/plugins.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 3 occurrences migrated to:
  https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) 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:13:58 -05:00
Diana Corbacho 1b75f7beec More tests for #40
Use served-named queues
2019-01-07 14:03:19 +00:00
Diana Corbacho 81836b3531 Refactor test code
References #40.
2019-01-07 13:20:23 +00:00
Michael Klishin 235bacb3b4 More tests for #40 2019-01-07 15:56:17 +03:00
Michael Klishin 93626ee0c8 Add a failing test for the scenario outlined in #40 2019-01-07 15:24:12 +03:00
Michael Klishin 0638c70552 Make chi squared test an observation we log, not an assertion
Due to randomness of the inputs and other characteristics that vary
beetween environments it doesn't always end up being < the expected
value but there's plenty of evidence that in most environments
the resulting distribution is very uniform (for all intents and
purposes of this plugin anyway).

References #37, #39.
2018-08-31 23:51:36 +02:00
Michael Klishin 6ace19d972 Use only a subset of queues in routing tests 2018-08-28 20:01:25 +03:00
Michael Klishin 0b1776d59d More tests, more idempotent binding management operations
[#159822323]
2018-08-28 19:53:52 +03:00
Michael Klishin b368ee922e Increase sample count to pass Chi squared test in more environments, reorganise tests
We still depend on the PRNG to provide a reasonably uniform distribution
of inputs (e.g. routing keys) but things pass in at least 3 different environments
reliably with 150K iterations.

Pair: @dcorbacho.

References #37, #38.
2018-08-21 16:40:21 +03:00
Michael Klishin ab5f54ee8f Bring back the Chi squared test assertion, bump the number of samples 2018-08-21 16:23:10 +03:00
Michael Klishin 67fe821b79 Fix a warning 2018-08-21 16:03:18 +03:00
Michael Klishin 05e7cc756f Don't assert on Chi squared test value
In some environments, namely our Concourse containers, with *some* iterations
of the test the value exceeds the reference value of p-value = 0.01.

This may be specific to OTP 19.3 or certain platforms. This is not
something that I can reproduce in a number of OTP 21 environments.

References #37, #38.
2018-08-21 06:50:04 +03:00
Michael Klishin d6e9fd9b9e Test suite improvements
* Use publisher confirms, that's what the test really needs
 * Clean up exchanges before setting up topology to make sure failing tests
   do not leave anything behind
2018-08-20 19:47:43 +03:00
Michael Klishin e132a0a865 A typo 2018-08-20 18:31:56 +03:00
Michael Klishin b887efdcf3 Extract a few test helpers 2018-08-20 15:05:01 +03:00
Diana Corbacho f319c84343 Test different bucket sizes 2018-08-20 11:07:12 +01:00
Diana Corbacho 02c5be2d54 Test - and fix - binding cleanup 2018-08-20 08:57:35 +01:00
Diana Corbacho d82a77cecc Verify distribution using chi-square test 2018-08-17 12:12:21 +01:00
Michael Klishin 72623501a4 Merge branch 'stable' 2017-04-02 21:56:37 +03:00
Michael Klishin c30520abbd (c) year 2017-04-02 21:47:35 +03:00
Jean-Sébastien Pédron a5323b7379 Use `rand` directly in master because we require Erlang 18.3
References rabbitmq/rabbitmq-server#860.
[#122335241]
2016-06-30 17:30:20 +02:00
Jean-Sébastien Pédron 9aa6728140 Use the new `rand_compat` module to transition from `random` to `rand`
References #860.
[#122335241]
2016-06-29 13:25:19 +02:00
Michael Klishin 54d88af579 Not really probabilistic 2016-06-23 00:17:31 +03:00
Michael Klishin 619160c4b4 Switch test suite to Common Test
Fixes #21.
2016-06-20 16:30:26 +03:00
Michael Klishin 3e06644577 Update (c) info 2016-01-01 12:59:16 +03:00
Alvaro Videla b506dad8c0 fixes connection leaking on tests 2015-09-16 14:38:26 +03:00
Gavin M. Roy a9bcb539b4 Add routing on message properties
Summary:

Add a new hash-property argument setting that allows for message hasing based upon the correlation_id or message_id.

Changes:

- Validate the exchange upon creation to ensure that hash-header and hash-property are not both set at the same time. Additionally validate the value of hash-property when set is one of correlation_id or message_id
- Change the signature of hash/2 for header to match on {header, Header} instead of {longstr, Header}
- Add a new hash/2 implementation that matches on {property, Value} for returning the hashable string from the message properties
- Implement a new hash_on/1 method for selecting the data the message will be routed on
- Implement a new hash_args/1 method for returning the configuration for both hash-header and hash-property
- Add test coverage for message property based routing

This addresses the proposal I outlined in #7
2015-09-02 12:33:32 -04:00
Michael Klishin 8728d6b476 Clean up declared queues 2015-09-02 11:23:25 +03:00
Michael Klishin fb8dba5018 Cosmetics 2015-09-02 11:21:27 +03:00
Gavin M. Roy c023431dec Validate routing key when binding
- Address #6 by validating that the routing key is both numeric and non-negative.
- Add unit tests to cover both cases.
2015-09-01 12:03:33 -04:00
Simon MacMullen e89376c58c Update copyright for 2014 2014-03-17 17:25:20 +00:00
Simon MacMullen d56ade9bf3 s/VMware/GoPivotal/g 2013-07-01 10:49:11 +01:00
Emile Joubert 5d2f230fdf Merge heads 2013-02-12 11:18:27 +00:00
Emile Joubert 38b8f1967b Update copyright 2013 2013-01-23 11:29:20 +00:00
Simon MacMullen 30801fb358 A test would be nice. 2013-01-18 14:22:00 +00:00
Simon MacMullen 57c59f05b3 Remove unused variables 2013-01-09 14:21:20 +00:00
Simon MacMullen 0c27693353 Derp, use arguments rather than environment. And add a touch of documentation. 2013-01-09 11:10:05 +00:00
Simon MacMullen 71ad929bcf I realise now this should be keyed off exchange arguments, but I want to go home and I hate leaving things uncommitted. 2013-01-08 18:34:55 +00:00
Emile Joubert 996e96c6c1 Update copyright 2012 2012-02-02 12:53:17 +00:00