Skip to content

Commit d7a2118

Browse files
committed
HOTFIX Ignore order of messages in MessageControllerTest
Signed-off-by: Jonas Arnhold <jonasarnhold@web.de>
1 parent 3f16e66 commit d7a2118

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

backend/src/test/java/de/amos/apachepulsarui/controller/MessageControllerTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.util.Set;
2222

2323
import static java.util.Collections.emptyList;
24-
import static org.hamcrest.Matchers.equalTo;
24+
import static org.hamcrest.Matchers.containsInAnyOrder;
2525
import static org.hamcrest.Matchers.hasSize;
2626
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
2727
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
@@ -49,8 +49,7 @@ void getMessages_returnsMessages() throws Exception {
4949
.contentType(MediaType.APPLICATION_JSON))
5050
.andExpect(status().isOk())
5151
.andExpect(jsonPath("$.messages", hasSize(2)))
52-
.andExpect(jsonPath("$.messages[0].payload", equalTo("Nebuchadnezzar")))
53-
.andExpect(jsonPath("$.messages[1].payload", equalTo("Serenity")));
52+
.andExpect(jsonPath("$.messages[*].payload", containsInAnyOrder("Nebuchadnezzar", "Serenity")));
5453
}
5554

5655
@Test

0 commit comments

Comments
 (0)