Skip to content

Commit

Permalink
fix timing issue in integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
fstab committed Dec 28, 2017
1 parent 4dee9db commit ebbff76
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -41,13 +41,15 @@ public void testWildfly() throws Exception {
Assertions.assertEquals(restResponse.code(), 200);
Assertions.assertTrue(restResponse.body().string().contains("John Smith"));

Thread.sleep(100); // metric is incremented after servlet has written the response, wait a little to get the updated metric
assertMetrics(client, "1.0");

// Execute REST call again
restResponse = client.newCall(restRequest).execute();
Assertions.assertEquals(restResponse.code(), 200);
Assertions.assertTrue(restResponse.body().string().contains("John Smith"));

Thread.sleep(100); // metric is incremented after servlet has written the response, wait a little to get the updated metric
assertMetrics(client, "2.0");
}

Expand Down

0 comments on commit ebbff76

Please sign in to comment.