This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new 766ffea3d [SCB-2692] fixing flaky tests in foundations (#3393)
766ffea3d is described below

commit 766ffea3d8f9e055e08ae4c3476a9e0cd05f2505
Author: anantdahiya8 <[email protected]>
AuthorDate: Sun Oct 16 20:21:42 2022 -0500

    [SCB-2692] fixing flaky tests in foundations (#3393)
---
 .../foundation/vertx/http/TestAbstractHttpServletRequest.java         | 2 +-
 .../foundation/vertx/http/TestStandardHttpServletRequestEx.java       | 4 ++--
 .../vertx/http/TestVertxServerRequestToHttpServletRequest.java        | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestAbstractHttpServletRequest.java
 
b/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestAbstractHttpServletRequest.java
index 653bb5a68..cf1b0bfd4 100644
--- 
a/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestAbstractHttpServletRequest.java
+++ 
b/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestAbstractHttpServletRequest.java
@@ -39,7 +39,7 @@ public class TestAbstractHttpServletRequest {
     MatcherAssert.assertThat(Collections.list(request.getAttributeNames()), 
Matchers.contains(key));
 
     request.setAttribute("a2", "v");
-    MatcherAssert.assertThat(Collections.list(request.getAttributeNames()), 
Matchers.contains(key, "a2"));
+    MatcherAssert.assertThat(Collections.list(request.getAttributeNames()), 
Matchers.containsInAnyOrder(key, "a2"));
 
     request.removeAttribute(key);
     Assertions.assertNull(request.getAttribute(key));
diff --git 
a/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestStandardHttpServletRequestEx.java
 
b/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestStandardHttpServletRequestEx.java
index 9aed227b3..299dbf6f5 100644
--- 
a/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestStandardHttpServletRequestEx.java
+++ 
b/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestStandardHttpServletRequestEx.java
@@ -131,7 +131,7 @@ public class TestStandardHttpServletRequestEx {
       }
     };
 
-    MatcherAssert.assertThat(Collections.list(requestEx.getParameterNames()), 
Matchers.contains("p1", "p2"));
+    MatcherAssert.assertThat(Collections.list(requestEx.getParameterNames()), 
Matchers.containsInAnyOrder("p1", "p2"));
     MatcherAssert.assertThat(requestEx.getParameterValues("p1"), 
Matchers.arrayContaining("v1-1", "v1-2", "v1-3"));
     Assertions.assertEquals("v1-1", requestEx.getParameter("p1"));
   }
@@ -149,6 +149,6 @@ public class TestStandardHttpServletRequestEx {
 
     Assertions.assertSame(parameterMap, requestEx.getParameterMap());
 
-    MatcherAssert.assertThat(Collections.list(requestEx.getParameterNames()), 
Matchers.contains("k1", "k2"));
+    MatcherAssert.assertThat(Collections.list(requestEx.getParameterNames()), 
Matchers.containsInAnyOrder("k1", "k2"));
   }
 }
diff --git 
a/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestVertxServerRequestToHttpServletRequest.java
 
b/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestVertxServerRequestToHttpServletRequest.java
index 8479e7014..7be1f187a 100644
--- 
a/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestVertxServerRequestToHttpServletRequest.java
+++ 
b/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/http/TestVertxServerRequestToHttpServletRequest.java
@@ -491,6 +491,6 @@ public class TestVertxServerRequestToHttpServletRequest {
 
     Assertions.assertSame(parameterMap, request.getParameterMap());
 
-    MatcherAssert.assertThat(Collections.list(request.getParameterNames()), 
Matchers.contains("k1", "k2"));
+    MatcherAssert.assertThat(Collections.list(request.getParameterNames()), 
Matchers.containsInAnyOrder("k1", "k2"));
   }
 }

Reply via email to