HDFS-11272. Refine the assert messages in TestFSDirAttrOp. Contributed by Jimmy Xiang.

(cherry picked from commit ea547529cb)
(cherry picked from commit cd331556f6)
This commit is contained in:
Akira Ajisaka 2016-12-26 17:15:45 +09:00
parent daa475ff72
commit 0caa114183
1 changed files with 5 additions and 5 deletions

View File

@ -53,25 +53,25 @@ public class TestFSDirAttrOp {
@Test
public void testUnprotectedSetTimes() throws Exception {
// atime < access time + precision
assertFalse("SetTimes should not update access time"
assertFalse("SetTimes should not update access time "
+ "because it's within the last precision interval",
unprotectedSetTimes(100, 0, 1000, -1, false));
// atime = access time + precision
assertFalse("SetTimes should not update access time"
assertFalse("SetTimes should not update access time "
+ "because it's within the last precision interval",
unprotectedSetTimes(1000, 0, 1000, -1, false));
// atime > access time + precision
assertTrue("SetTimes should store access time",
assertTrue("SetTimes should update access time",
unprotectedSetTimes(1011, 10, 1000, -1, false));
// atime < access time + precision, but force is set
assertTrue("SetTimes should store access time",
assertTrue("SetTimes should update access time",
unprotectedSetTimes(100, 0, 1000, -1, true));
// atime < access time + precision, but mtime is set
assertTrue("SetTimes should store access time",
assertTrue("SetTimes should update access time",
unprotectedSetTimes(100, 0, 1000, 1, false));
}
}