Skip to content

Commit 266dad1

Browse files
authored
HDFS-17706. TestBlockTokenWithDFSStriped fails due to closed streams. (#7275). Contribtued by Felix N.
Signed-off-by: He Xiaoqiao <[email protected]>
1 parent c24d569 commit 266dad1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFS.java

+3
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,9 @@ protected void doTestRead(Configuration conf, MiniDFSCluster cluster,
582582

583583
// restart the namenode to allow DFSClient to re-fetch tokens
584584
cluster.restartNameNode(0);
585+
// Reopen closed streams
586+
in1 = fs.open(fileToRead);
587+
in3 = fs.open(fileToRead);
585588
// verify blockSeekTo() works again (by transparently re-fetching
586589
// tokens from namenode)
587590
in1.seek(0);

0 commit comments

Comments
 (0)