HDFS-3037. TestMulitipleNNDataBlockScanner#testBlockScannerAfterRestart is racy. Contributed by Aaron T. Myers.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1296016 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Aaron Myers 2012-03-02 01:26:54 +00:00
parent b2f67b4704
commit 6da670ce6a
2 changed files with 6 additions and 0 deletions

View File

@ -121,6 +121,9 @@ Trunk (unreleased changes)
HDFS-2908. Add apache license header for StorageReport.java. (Brandon Li HDFS-2908. Add apache license header for StorageReport.java. (Brandon Li
via jitendra) via jitendra)
HDFS-3037. TestMulitipleNNDataBlockScanner#testBlockScannerAfterRestart is
racy. (atm)
Release 0.23.3 - UNRELEASED Release 0.23.3 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -146,6 +146,9 @@ public void testBlockScannerAfterRestart() throws IOException,
cluster.waitActive(); cluster.waitActive();
DataNode dn = cluster.getDataNodes().get(0); DataNode dn = cluster.getDataNodes().get(0);
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
while (!dn.blockScanner.isInitialized(bpids[i])) {
Thread.sleep(1000);
}
long blocksScanned = 0; long blocksScanned = 0;
while (blocksScanned != 20) { while (blocksScanned != 20) {
if (dn.blockScanner != null) { if (dn.blockScanner != null) {