Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,15 @@ class NonBalancingIntegrationSpec(backend: String)

Future.sequence(requestsOnFirstConnection).futureValue
server1.terminate(5.seconds).futureValue
// Give it some time to complete unbind (suspected to cause test flakyness)
Thread.sleep(250)
// And restart
Http().newServerAt("127.0.0.1", server1.localAddress.getPort).bind(GreeterServiceHandler(service1)).futureValue

val requestsOnSecondConnection = List.fill(requestsPerConnection)(client.sayHello(HelloRequest(s"Hello")))

val replies = Future.sequence(requestsOnSecondConnection)
Await.ready(replies, 15.seconds)

if (this.isInstanceOf[NonBalancingIntegrationSpecNetty] && service1.greetings.get != numberOfRequests) {
system.log.warning(
s"Found only ${service1.greetings.get} requests rather than $numberOfRequests, likely a flaky test")
pending
} else
service1.greetings.get should be(numberOfRequests)
Future.sequence(requestsOnSecondConnection).futureValue(timeout(15.seconds))
service1.greetings.get should be(numberOfRequests)
}

"re-discover endpoints on failure" in {
Expand Down
Loading