GitHub user jdanekrh opened a pull request:
https://github.com/apache/activemq-artemis/pull/435
Put parameters into query string in a predictable order
Previously, the order of query parameters depended on the iteration order
of items in a Set.
This order is undefined for some Sets. Nevertheless, unit test for
createQueryString expected
that query parameters are in a particular order.
I have indeed seen a build fail because of it from time to time, for
example in this build of revision ab98eb9620bb5e53abf223e622fac2919b2808a7 from
two weeks ago
```
queryString1:
queryString2: key1=value1
queryString3: key2=value2&key1=value1
Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.508 sec
<<< FAILURE! - in org.apache.activemq.artemis.utils.URIParserTest
testQueryConversion(org.apache.activemq.artemis.utils.URIParserTest) Time
elapsed: 0.023 sec <<< FAILURE!
org.junit.ComparisonFailure: expected:<key[1=value1&key2=value2]> but
was:<key[2=value2&key1=value1]>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.junit.Assert.assertEquals(Assert.java:144)
at
org.apache.activemq.artemis.utils.URIParserTest.testQueryConversion(URIParserTest.java:120)
Results :
Failed tests:
URIParserTest.testQueryConversion:120
expected:<key[1=value1&key2=value2]> but was:<key[2=value2&key1=value1]>
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jdanekrh/activemq-artemis
URIParserTest.testQueryConversion
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/435.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #435
----
commit b0dae91f2810745115c6f7904c4ddc706cd0435e
Author: Jiri Danek <[email protected]>
Date: 2016-03-31T21:18:17Z
Put parameters into query string in a predictable order
Previously, the order of query parameters depended on the iteration order
of items in a Set.
This order is undefined for some Sets. Nevertheless, unit test for
createQueryString expected
that query parameters are in a particular order.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---