"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "zookeeper-server/src/test/java/org/apache/zookeeper/test/InvalidSnapshotTest.java" between
apache-zookeeper-3.5.5.tar.gz and apache-zookeeper-3.5.6.tar.gz

About: Apache ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services (was a sub-project of Hadoop).

InvalidSnapshotTest.java  (apache-zookeeper-3.5.5):InvalidSnapshotTest.java  (apache-zookeeper-3.5.6)
skipping to change at line 28 skipping to change at line 28
package org.apache.zookeeper.test; package org.apache.zookeeper.test;
import static org.apache.zookeeper.test.ClientBase.CONNECTION_TIMEOUT; import static org.apache.zookeeper.test.ClientBase.CONNECTION_TIMEOUT;
import java.io.File; import java.io.File;
import org.apache.zookeeper.PortAssignment; import org.apache.zookeeper.PortAssignment;
import org.apache.zookeeper.ZKTestCase; import org.apache.zookeeper.ZKTestCase;
import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.server.LogFormatter;
import org.apache.zookeeper.server.ServerCnxnFactory; import org.apache.zookeeper.server.ServerCnxnFactory;
import org.apache.zookeeper.server.SnapshotFormatter; import org.apache.zookeeper.server.SnapshotFormatter;
import org.apache.zookeeper.server.SyncRequestProcessor; import org.apache.zookeeper.server.SyncRequestProcessor;
import org.apache.zookeeper.server.ZooKeeperServer; import org.apache.zookeeper.server.ZooKeeperServer;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
public class InvalidSnapshotTest extends ZKTestCase{ public class InvalidSnapshotTest extends ZKTestCase{
private final static Logger LOG = LoggerFactory.getLogger(InvalidSnapshotTes t.class); private final static Logger LOG = LoggerFactory.getLogger(InvalidSnapshotTes t.class);
private static final String HOSTPORT = private static final String HOSTPORT =
"127.0.0.1:" + PortAssignment.unique(); "127.0.0.1:" + PortAssignment.unique();
private static final File testData = new File( private static final File testData = new File(
System.getProperty("test.data.dir", "src/test/resources/data")); System.getProperty("test.data.dir", "src/test/resources/data"));
/** /**
* Verify the LogFormatter by running it on a known file. * Verify the LogFormatter by running it on a known file.
*/ */
@SuppressWarnings("deprecation")
@Test @Test
public void testLogFormatter() throws Exception { public void testLogFormatter() throws Exception {
File snapDir = new File(testData, "invalidsnap"); File snapDir = new File(testData, "invalidsnap");
File logfile = new File(new File(snapDir, "version-2"), "log.274"); File logfile = new File(new File(snapDir, "version-2"), "log.274");
String[] args = {logfile.getCanonicalFile().toString()}; String[] args = {logfile.getCanonicalFile().toString()};
LogFormatter.main(args); org.apache.zookeeper.server.LogFormatter.main(args);
} }
/** /**
* Verify the SnapshotFormatter by running it on a known file. * Verify the SnapshotFormatter by running it on a known file.
*/ */
@Test @Test
public void testSnapshotFormatter() throws Exception { public void testSnapshotFormatter() throws Exception {
File snapDir = new File(testData, "invalidsnap"); File snapDir = new File(testData, "invalidsnap");
File snapfile = new File(new File(snapDir, "version-2"), "snapshot.272") ; File snapfile = new File(new File(snapDir, "version-2"), "snapshot.272") ;
String[] args = {snapfile.getCanonicalFile().toString()}; String[] args = {snapfile.getCanonicalFile().toString()};
 End of changes. 3 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)