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

This commit is contained in:
tedyu 2014-12-15 11:49:39 -08:00
parent 2cab24ab9a
commit 065d03b784
1 changed files with 5 additions and 1 deletions

View File

@ -591,12 +591,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;
}
}
};