Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEST] wait for http channels to be closed in ESIntegTestCase #45977

Merged
merged 1 commit into from
Aug 27, 2019
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 @@ -509,7 +509,7 @@ private TestCluster buildAndPutCluster(Scope currentClusterScope, long seed) thr
return testCluster;
}

private static void clearClusters() throws IOException {
private static void clearClusters() throws Exception {
if (!clusters.isEmpty()) {
IOUtils.close(clusters.values());
clusters.clear();
Expand All @@ -518,9 +518,9 @@ private static void clearClusters() throws IOException {
restClient.close();
restClient = null;
}
assertEquals(HttpChannelTaskHandler.INSTANCE.getNumChannels() + " channels still being tracked in " +
HttpChannelTaskHandler.class.getSimpleName() + " while there should be none", 0,
HttpChannelTaskHandler.INSTANCE.getNumChannels());
assertBusy(() -> assertEquals(HttpChannelTaskHandler.INSTANCE.getNumChannels() + " channels still being tracked in " +
HttpChannelTaskHandler.class.getSimpleName() + " while there should be none", 0,
HttpChannelTaskHandler.INSTANCE.getNumChannels()));
}

private void afterInternal(boolean afterClass) throws Exception {
Expand Down