Skip to content

Commit 97eddca

Browse files
author
fuchaohong
committed
fix testRestartingNamenodeWithStateIDContextDisabled.
1 parent 92e5e19 commit 97eddca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestObserverWithRouter.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,10 @@ public void testRestartingNamenodeWithStateIDContextDisabled(ConfigSetting confi
11411141
Configuration conf = getConfToEnableObserverReads(configSetting);
11421142
conf.setBoolean("fs.hdfs.impl.disable.cache", true);
11431143
FileSystem fileSystem2 = routerContext.getFileSystem(conf);
1144-
fileSystem2.msync();
1144+
if (fileSystem.getConf().getBoolean(
1145+
HdfsClientConfigKeys.DFS_RBF_OBSERVER_READ_ENABLE, false)){
1146+
fileSystem2.msync();
1147+
}
11451148
fileSystem2.open(path).close();
11461149

11471150
long observerCount2 = routerContext.getRouter().getRpcServer()

0 commit comments

Comments
 (0)