HADOOP-14472. Azure: TestReadAndSeekPageBlobAfterWrite fails intermittently. Contributed by Mingliang Liu
(cherry picked from commit 6b5285bbcb
)
This commit is contained in:
parent
f7e597b56d
commit
bacfd1baae
|
@ -275,18 +275,8 @@ public class TestReadAndSeekPageBlobAfterWrite {
|
||||||
writesSinceHFlush++;
|
writesSinceHFlush++;
|
||||||
output.flush();
|
output.flush();
|
||||||
if ((i % SYNC_INTERVAL) == 0) {
|
if ((i % SYNC_INTERVAL) == 0) {
|
||||||
long start = Time.monotonicNow();
|
|
||||||
output.hflush();
|
output.hflush();
|
||||||
writesSinceHFlush = 0;
|
writesSinceHFlush = 0;
|
||||||
long end = Time.monotonicNow();
|
|
||||||
|
|
||||||
// A true, round-trip synchronous flush to Azure must take
|
|
||||||
// a significant amount of time or we are not syncing to storage correctly.
|
|
||||||
LOG.debug("hflush duration = " + (end - start) + " msec.");
|
|
||||||
assertTrue(String.format(
|
|
||||||
"hflush duration of %d, less than minimum expected of %d",
|
|
||||||
end - start, MINIMUM_EXPECTED_TIME),
|
|
||||||
end - start >= MINIMUM_EXPECTED_TIME);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue