Skip to content

Commit

Permalink
test: fix MockWebServer crud test concurrency issue
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Dec 20, 2023
1 parent 8a2073a commit cfbfa04
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down

0 comments on commit cfbfa04

Please sign in to comment.