Skip to content

Commit c392d90

Browse files
HDFS-15471. TestHDFSContractMultipartUploader failing (#2252)
Contributed by Steve Loughran (Was: broken by Steve Loughran)
1 parent bfd99f3 commit c392d90

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractMultipartUploaderTest.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -807,12 +807,17 @@ public void testConcurrentUploads() throws Throwable {
807807

808808
// now upload part 2.
809809
complete(file, upload2, partHandles2);
810-
// and await the visible length to match
811-
eventually(timeToBecomeConsistentMillis(),
812-
() -> verifyFileLength(file, size2),
813-
new LambdaTestUtils.ProportionalRetryInterval(
814-
CONSISTENCY_INTERVAL,
815-
timeToBecomeConsistentMillis()));
810+
811+
// and await the visible length to match, if this FS is not
812+
// consistent.
813+
final int consistencyDelay = timeToBecomeConsistentMillis();
814+
if (consistencyDelay > 0) {
815+
eventually(consistencyDelay,
816+
() -> verifyFileLength(file, size2),
817+
new LambdaTestUtils.ProportionalRetryInterval(
818+
CONSISTENCY_INTERVAL,
819+
consistencyDelay));
820+
}
816821

817822
verifyContents(file, digest2, size2);
818823
}

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/contract/hdfs/TestHDFSContractMultipartUploader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class TestHDFSContractMultipartUploader extends
3535
AbstractContractMultipartUploaderTest {
3636

3737
protected static final Logger LOG =
38-
LoggerFactory.getLogger(AbstractContractMultipartUploaderTest.class);
38+
LoggerFactory.getLogger(TestHDFSContractMultipartUploader.class);
3939

4040
@BeforeClass
4141
public static void createCluster() throws IOException {

0 commit comments

Comments
 (0)