HDFS-10934. TestDFSShell#testStat fails intermittently. Contributed by Eric Badger
(cherry picked from commit f61e3d13e9
)
This commit is contained in:
parent
d963ecb918
commit
612aa0cc0b
|
@ -2060,11 +2060,11 @@ public class TestDFSShell {
|
||||||
fmt.setTimeZone(TimeZone.getTimeZone("UTC"));
|
fmt.setTimeZone(TimeZone.getTimeZone("UTC"));
|
||||||
final Path testDir1 = new Path("testStat", "dir1");
|
final Path testDir1 = new Path("testStat", "dir1");
|
||||||
dfs.mkdirs(testDir1);
|
dfs.mkdirs(testDir1);
|
||||||
final FileStatus status1 = dfs.getFileStatus(testDir1);
|
|
||||||
final String mtime1 = fmt.format(new Date(status1.getModificationTime()));
|
|
||||||
final Path testFile2 = new Path(testDir1, "file2");
|
final Path testFile2 = new Path(testDir1, "file2");
|
||||||
DFSTestUtil.createFile(dfs, testFile2, 2 * blockSize, (short) 3, 0);
|
DFSTestUtil.createFile(dfs, testFile2, 2 * blockSize, (short) 3, 0);
|
||||||
final FileStatus status2 = dfs.getFileStatus(testDir1);
|
final FileStatus status1 = dfs.getFileStatus(testDir1);
|
||||||
|
final String mtime1 = fmt.format(new Date(status1.getModificationTime()));
|
||||||
|
final FileStatus status2 = dfs.getFileStatus(testFile2);
|
||||||
final String mtime2 = fmt.format(new Date(status2.getModificationTime()));
|
final String mtime2 = fmt.format(new Date(status2.getModificationTime()));
|
||||||
|
|
||||||
final ByteArrayOutputStream out = new ByteArrayOutputStream();
|
final ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
|
|
Loading…
Reference in New Issue