From 84aebc2973adb40e8d945a9c7016f8b2771c19b9 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Fri, 15 Apr 2016 12:41:49 +0900 Subject: [PATCH] Fix random failure of security group unit test CLITestV20SecurityGroupsJSON.test_extend_list_exceed_max_uri_len fails randomly because this test uses query parameters and the order of query parameters in a construct URL is not deterministic. As a result the test failed randomly. The test should use MyUrlComparator to compare URLs. MyUrlComparator ignores the order parameters when comparing URLs. Change-Id: I8a8116f45583102fa1351d17a1cc5174bdce3cc9 Closes-Bug: #1570689 --- neutronclient/tests/unit/test_cli20_securitygroup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neutronclient/tests/unit/test_cli20_securitygroup.py b/neutronclient/tests/unit/test_cli20_securitygroup.py index 3bd62edb3..1af88ff79 100644 --- a/neutronclient/tests/unit/test_cli20_securitygroup.py +++ b/neutronclient/tests/unit/test_cli20_securitygroup.py @@ -307,7 +307,8 @@ class CLITestV20SecurityGroupsJSON(test_cli20.CLITestV20Base): self.client.httpclient._check_uri_length( mox.IgnoreArg()).AndReturn(None) self.client.httpclient.request( - test_cli20.end_url(path, item['filter']), + test_cli20.MyUrlComparator( + test_cli20.end_url(path, item['filter']), self.client), 'GET', body=None, headers=mox.ContainsKeyValue(