Skip to content

Commit 24177ee

Browse files
committed
HDFS-17831 Unexpected exception in org.apache.hadoop.hdfs.server.namenode.TestCheckpoint with Java 24
1 parent 615f4fe commit 24177ee

File tree

1 file changed

+4
-1
lines changed
  • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode

1 file changed

+4
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
import org.apache.hadoop.util.ExitUtil;
8888
import org.apache.hadoop.util.ExitUtil.ExitException;
8989
import org.apache.hadoop.util.Lists;
90+
import org.apache.hadoop.util.Shell;
9091
import org.apache.hadoop.util.StringUtils;
9192
import org.slf4j.event.Level;
9293
import org.junit.jupiter.api.AfterEach;
@@ -653,7 +654,9 @@ public void testNameNodeImageSendFailWrongSize()
653654

654655
Mockito.doReturn(true).when(faultInjector)
655656
.shouldSendShortFile(filePathContaining("fsimage"));
656-
doSendFailTest("is not of the advertised size");
657+
String expectedText = Shell.isJavaVersionAtLeast(24) ? "Premature EOF" :
658+
"is not of the advertised size";
659+
doSendFailTest(expectedText);
657660
}
658661

659662
/**

0 commit comments

Comments
 (0)