From 8b85feceb78e4801ace063c18b40cc5ec309e339 Mon Sep 17 00:00:00 2001 From: tedyu Date: Mon, 15 Dec 2014 11:50:54 -0800 Subject: [PATCH] HBASE-12685 TestSplitLogManager#testLogFilesAreArchived sometimes times out due to race condition --- .../org/apache/hadoop/hbase/master/TestSplitLogManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java index e5781fe7597..f6a79535776 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java @@ -590,12 +590,16 @@ public class TestSplitLogManager { for (Map.Entry 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; } } };