From c45a5fe6d369993308b2933769261df04ecf042f Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Wed, 20 Dec 2023 14:59:25 +0100 Subject: [PATCH] test: fix MockWebServer crud test concurrency issue Signed-off-by: Marc Nuri --- .../mockwebserver/DefaultMockServerCrudTest.groovy | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/junit/mockwebserver/src/test/groovy/io/fabric8/mockwebserver/DefaultMockServerCrudTest.groovy b/junit/mockwebserver/src/test/groovy/io/fabric8/mockwebserver/DefaultMockServerCrudTest.groovy index c37f5211faa..2cc28a99290 100644 --- a/junit/mockwebserver/src/test/groovy/io/fabric8/mockwebserver/DefaultMockServerCrudTest.groovy +++ b/junit/mockwebserver/src/test/groovy/io/fabric8/mockwebserver/DefaultMockServerCrudTest.groovy @@ -90,12 +90,12 @@ class DefaultMockServerCrudTest extends Specification { and: "An instance of AsyncConditions" def async = new AsyncConditions(1) and: "Items in the server" - def itemsInServer = Future.all( - client.post(server.port, server.getHostName(), "/") - .sendJson(new User(1L, "user", true)), - client.post(server.port, server.getHostName(), "/") - .sendJson(new User(2L, "user-2", true)) - ) + def itemsInServer = client.post(server.port, server.getHostName(), "/") + .sendJson(new User(1L, "user", true)) + .compose { _ -> + client.post(server.port, server.getHostName(), "/") + .sendJson(new User(2L, "user-2", true)) + } when: "The request is sent and completed" itemsInServer.onComplete {isr ->