HDFS-6487. TestStandbyCheckpoint#testSBNCheckpoints is racy. Contributed by Mit Desai.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1601017 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Wang 2014-06-06 21:42:40 +00:00
parent 3cc1cddffb
commit 96defb2d7b
2 changed files with 15 additions and 0 deletions

View File

@ -153,6 +153,9 @@ Release 2.5.0 - UNRELEASED
HDFS-6369. Document that BlockReader#available() can return more bytes than HDFS-6369. Document that BlockReader#available() can return more bytes than
are remaining in the block (Ted Yu via Colin Patrick McCabe) are remaining in the block (Ted Yu via Colin Patrick McCabe)
HDFS-6487. TestStandbyCheckpoint#testSBNCheckpoints is racy.
(Mit Desai via wang)
OPTIMIZATIONS OPTIMIZATIONS
HDFS-6214. Webhdfs has poor throughput for files >2GB (daryn) HDFS-6214. Webhdfs has poor throughput for files >2GB (daryn)

View File

@ -153,6 +153,18 @@ public void testSBNCheckpoints() throws Exception {
// do a checkpoint and save one to its local directories. // do a checkpoint and save one to its local directories.
HATestUtil.waitForCheckpoint(cluster, 1, ImmutableList.of(12)); HATestUtil.waitForCheckpoint(cluster, 1, ImmutableList.of(12));
GenericTestUtils.waitFor(new Supplier<Boolean>() {
@Override
public Boolean get() {
if(tmpOivImgDir.list().length > 0) {
return true;
}
else {
return false;
}
}
}, 1000, 60000);
// It should have saved the oiv image too. // It should have saved the oiv image too.
assertEquals("One file is expected", 1, tmpOivImgDir.list().length); assertEquals("One file is expected", 1, tmpOivImgDir.list().length);