HBASE-12685 TestSplitLogManager#testLogFilesAreArchived sometimes times out due to race condition

This commit is contained in:
tedyu 2014-12-15 11:50:54 -08:00
parent ee4d9b5315
commit 8b85feceb7
1 changed files with 5 additions and 1 deletions

View File

@ -590,12 +590,16 @@ public class TestSplitLogManager {
for (Map.Entry<String, Task> entry : slm.getTasks().entrySet()) {
final ServerName worker1 = ServerName.valueOf("worker1,1,1");
SplitLogTask slt = new SplitLogTask.Done(worker1, RecoveryMode.LOG_SPLITTING);
boolean encounteredZKException = false;
try {
ZKUtil.setData(zkw, entry.getKey(), slt.toByteArray());
} catch (KeeperException e) {
LOG.warn(e);
encounteredZKException = true;
}
if (!encounteredZKException) {
done = true;
}
done = true;
}
}
};