Skip to content

Commit

Permalink
Added more info for random failures in TouchCommandTest
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Feb 7, 2014
1 parent 426f0c7 commit b78fd29
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ public void testTouchExistingFile() throws Exception

Result result = shellTest.execute("touch foo.txt", 5, TimeUnit.SECONDS);
Assert.assertFalse(result instanceof Failed);

Assert.assertTrue(lastModified < child.getLastModified());

long newLastModified = child.getLastModified();
Assert.assertTrue("Last modified not changed Original: " + lastModified + " New: " + newLastModified,
newLastModified - lastModified > 0);

Assert.assertTrue(child.exists());
child.delete();
}
Expand Down

0 comments on commit b78fd29

Please sign in to comment.