use of com.linkedin.databus2.ggParser.staxparser.StaxBuilderTest in project databus by linkedin.
the class TestParser method keyCompressionTest.
/**
* Check key compression. If there are multiple updates on the same key, choose the last one
*/
@Test
public void keyCompressionTest() throws Exception {
keyCompressionCallback callback = new keyCompressionCallback();
StaxBuilderTest test = new StaxBuilderTest(actualXmlDataDir + "keyCompression.xml", service, callback);
test.processXml();
}
use of com.linkedin.databus2.ggParser.staxparser.StaxBuilderTest in project databus by linkedin.
the class TestParser method missingScnCheck.
/**
* Missing scn should throw an exception
*/
@Test
public void missingScnCheck() throws Exception {
BasicOperationsCheckCallback callback = new BasicOperationsCheckCallback();
try {
StaxBuilderTest test = new StaxBuilderTest(actualXmlDataDir + "missingscn.xml", service, callback);
test.processXml();
Assert.fail("Test has not detected failure on missing scn");
} catch (DatabusException e) {
LOG.info("Caught databus exception, verifying if it's for missing scn..");
String error = e.getMessage();
String expected = "Unable to find scn for the given dbUpdate, terminating the parser";
Assert.assertEquals(error, expected);
}
}
use of com.linkedin.databus2.ggParser.staxparser.StaxBuilderTest in project databus by linkedin.
the class TestParser method basicOperationsTest.
/**
* Makes sure there are no exceptions is thrown on parsing xml, verify the keys processed.
* @throws DatabusException
* @throws FileNotFoundException
*/
@Test
public void basicOperationsTest() throws Exception {
BasicOperationsCheckCallback callback = new BasicOperationsCheckCallback();
StaxBuilderTest test = new StaxBuilderTest(actualXmlDataDir + "basicprocessing.xml", service, callback);
test.processXml();
}
use of com.linkedin.databus2.ggParser.staxparser.StaxBuilderTest in project databus by linkedin.
the class TestParser method extraFieldsTest.
/**
* Checks if the parser it able to construct events with extra fields
*/
@Test
public void extraFieldsTest() throws Exception {
BasicOperationsCheckCallback callback = new BasicOperationsCheckCallback();
StaxBuilderTest test = new StaxBuilderTest(actualXmlDataDir + "extrafields.xml", service, callback);
test.processXml();
}
Aggregations