Navigation Menu

Skip to content

Commit

Permalink
fix test to support retry of batches
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Jul 12, 2016
1 parent b3d5fc3 commit 275667c
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -72,9 +72,9 @@ public void testExtractConfigurationStandalone() throws Exception {
dataExtractorService.extractConfigurationStandalone(TestConstants.TEST_CLIENT_NODE, writer);
String content = writer.getBuffer().toString();
assertNumberOfLinesThatStartWith(25, "table,", content, false, true);
assertNumberOfLinesThatStartWith(24, "columns,", content);
assertNumberOfLinesThatStartWith(24, "keys,", content);
assertNumberOfLinesThatStartWith(24, "sql,", content);
assertNumberOfLinesThatStartWith(26, "columns,", content);
assertNumberOfLinesThatStartWith(26, "keys,", content);
assertNumberOfLinesThatStartWith(26, "sql,", content);
assertNumberOfLinesThatStartWith(0, "update,", content);
assertNumberOfLinesThatStartWith(65, "insert,", content, false, true);
assertNumberOfLinesThatStartWith(1, "commit,-9999", content);
Expand Down Expand Up @@ -108,7 +108,7 @@ public void testExtractOneBatchOneRow() {

// same batch should be extracted
results = extract();
assertNumberOfLinesThatStartWith(1, "batch," + batchId, results.getCsv());
assertNumberOfLinesThatStartWith(1, "retry," + batchId, results.getCsv());
assertNumberOfLinesThatStartWith(1, "commit," + batchId, results.getCsv());

}
Expand All @@ -119,6 +119,7 @@ protected ExtractResults extract() {
InternalOutgoingTransport transport = new InternalOutgoingTransport(new BufferedWriter(
writer));
List<OutgoingBatch> batches = service.extract(new ProcessInfo(), TestConstants.TEST_CLIENT_NODE, transport);
transport.close();
return new ExtractResults(batches, writer.getBuffer().toString());
}

Expand Down

0 comments on commit 275667c

Please sign in to comment.