HDFS-15471. TestHDFSContractMultipartUploader failing (#2252)

Contributed by Steve Loughran
(Was: broken by Steve Loughran)
This commit is contained in:
Steve Loughran 2020-08-28 15:39:09 +01:00 committed by GitHub
parent bfd99f31fd
commit c392d9022a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 7 deletions

View File

@ -807,12 +807,17 @@ public void testConcurrentUploads() throws Throwable {
// now upload part 2.
complete(file, upload2, partHandles2);
// and await the visible length to match
eventually(timeToBecomeConsistentMillis(),
() -> verifyFileLength(file, size2),
new LambdaTestUtils.ProportionalRetryInterval(
CONSISTENCY_INTERVAL,
timeToBecomeConsistentMillis()));
// and await the visible length to match, if this FS is not
// consistent.
final int consistencyDelay = timeToBecomeConsistentMillis();
if (consistencyDelay > 0) {
eventually(consistencyDelay,
() -> verifyFileLength(file, size2),
new LambdaTestUtils.ProportionalRetryInterval(
CONSISTENCY_INTERVAL,
consistencyDelay));
}
verifyContents(file, digest2, size2);
}

View File

@ -35,7 +35,7 @@ public class TestHDFSContractMultipartUploader extends
AbstractContractMultipartUploaderTest {
protected static final Logger LOG =
LoggerFactory.getLogger(AbstractContractMultipartUploaderTest.class);
LoggerFactory.getLogger(TestHDFSContractMultipartUploader.class);
@BeforeClass
public static void createCluster() throws IOException {