try {
fileSystem = cluster.getFileSystem();
// Keep open stream
outStream = writeFileAndSync(fileSystem, src, fileContent);
// Parameter true will ensure that NN came out of safemode
cluster.restartNameNode();
assertEquals(
"Not able to read the synced block content after NameNode restart (with append support)",
fileContent, getFileContentFromDFS(fileSystem));
} finally {
if (null != fileSystem)