|
@@ -70,6 +70,17 @@ public class InvalidSnapshotTest extends ZKTestCase implements Watcher {
|
|
SnapshotFormatter.main(args);
|
|
SnapshotFormatter.main(args);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Verify the SnapshotFormatter by running it on a known file with one null data.
|
|
|
|
+ */
|
|
|
|
+ @Test
|
|
|
|
+ public void testSnapshotFormatterWithNull() throws Exception {
|
|
|
|
+ File snapDir = new File(testData, "invalidsnap");
|
|
|
|
+ File snapfile = new File(new File(snapDir, "version-2"), "snapshot.273");
|
|
|
|
+ String[] args = {snapfile.getCanonicalFile().toString()};
|
|
|
|
+ SnapshotFormatter.main(args);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* test the snapshot
|
|
* test the snapshot
|
|
* @throws Exception an exception could be expected
|
|
* @throws Exception an exception could be expected
|