SOLR-9880 Fix concurrency bugs in tests.

This commit is contained in:
Andrzej Bialecki 2016-12-31 20:46:32 +01:00
parent 832d02bf49
commit fb2800b149
2 changed files with 4 additions and 2 deletions

View File

@ -73,7 +73,8 @@ public class SolrGangliaReporterTest extends SolrTestCaseJ4 {
gangliaReporter.start();
Thread.sleep(5000);
assertTrue(names.size() >= 3);
for (String name : names) {
String[] frozenNames = (String[])names.toArray(new String[names.size()]);
for (String name : frozenNames) {
assertTrue(name, name.startsWith("test.solr.node.cores."));
}
}

View File

@ -69,7 +69,8 @@ public class SolrGraphiteReporterTest extends SolrTestCaseJ4 {
assertTrue(reporter instanceof SolrGraphiteReporter);
Thread.sleep(5000);
assertTrue(mock.lines.size() >= 3);
for (String line : mock.lines) {
String[] frozenLines = (String[])mock.lines.toArray(new String[mock.lines.size()]);
for (String line : frozenLines) {
assertTrue(line, line.startsWith("test.solr.node.cores."));
}
} finally {