Merge pull request #2176 from druid-io/fix-again

attempt to fix transient tests again
This commit is contained in:
Nishant 2015-12-31 12:13:00 +05:30
commit 3d886d7dbf
2 changed files with 6 additions and 2 deletions

View File

@ -408,15 +408,17 @@ public class TestKafkaExtractionCluster
)
throws InterruptedException
{
final Function<String, String> extractionFn = lookup.get(namespace);
Function<String, String> extractionFn = lookup.get(namespace);
if (expected == null) {
while (extractionFn.apply(key) != null) {
Thread.sleep(100);
extractionFn = lookup.get(namespace);
}
} else {
while (!expected.equals(extractionFn.apply(key))) {
Thread.sleep(100);
extractionFn = lookup.get(namespace);
}
}
@ -431,10 +433,11 @@ public class TestKafkaExtractionCluster
)
throws InterruptedException
{
final Function<String, List<String>> extractionFn = lookup.get(namespace);
Function<String, List<String>> extractionFn = lookup.get(namespace);
while (!extractionFn.apply(key).equals(expected)) {
Thread.sleep(100);
extractionFn = lookup.get(namespace);
}
Assert.assertEquals("update check", expected, extractionFn.apply(key));

View File

@ -486,6 +486,7 @@ public class JDBCExtractionNamespaceTest
// rely on test timeout to break out of this loop
while (!extractionFn.apply(key).equals(expected)) {
Thread.sleep(100);
extractionFn = fnCache.get(namespace);
}
Assert.assertEquals(