|
@@ -186,6 +186,16 @@ public class TestSnapshotDiffReport {
|
|
|
"Directory is not a snapshottable directory: " + subsub1, e);
|
|
|
}
|
|
|
|
|
|
+ final String invalidName = "invalid";
|
|
|
+ try {
|
|
|
+ hdfs.getSnapshotDiffReport(sub1, invalidName, invalidName);
|
|
|
+ fail("Expect exception when providing invalid snapshot name for diff report");
|
|
|
+ } catch (IOException e) {
|
|
|
+ GenericTestUtils.assertExceptionContains(
|
|
|
+ "Cannot find the snapshot of directory " + sub1 + " with name "
|
|
|
+ + invalidName, e);
|
|
|
+ }
|
|
|
+
|
|
|
// diff between the same snapshot
|
|
|
SnapshotDiffReport report = hdfs.getSnapshotDiffReport(sub1, "s0", "s0");
|
|
|
System.out.println(report);
|