HDFS-15471. TestHDFSContractMultipartUploader failing (#2252)

Contributed by Steve Loughran
(Was: broken by Steve Loughran)

Change-Id: If6a82706f3ea6d802bc6da03c2a2ca734e30388f
This commit is contained in:
Steve Loughran 2020-08-28 15:39:09 +01:00
parent f6e1ed4f6b
commit 1b9109d237
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0
2 changed files with 12 additions and 7 deletions

View File

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

View File

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