public class SimpleSourceConnectorOutputTest extends ConnectorOutputTest
SimpleSourceConnector that is also able to test and verify the behavior of
ConnectorOutputTest.ConnectorOutputTest.InputStreamSupplier, ConnectorOutputTest.OutputStreamSupplier, ConnectorOutputTest.TestData, ConnectorOutputTest.TestSpecification, ConnectorOutputTest.VariableSupplier| Modifier and Type | Field and Description |
|---|---|
protected static String |
TOPIC_NAME |
CONNECTOR_OUTPUT_PATH, CONTROL_END, CONTROL_KEY, CONTROL_RESTART, CONTROL_STOP, DEFAULT_CONNECTOR_PROPERTIES_FILENAME, DEFAULT_ENV_PROPERTIES_FILENAME, DEFAULT_EXPECTED_RECORDS_FILENAME, ENV_CONNECTOR_TIMEOUT_IN_SECONDS, ENV_IGNORE_FIELDS, OFFSET_STORE_PATH| Constructor and Description |
|---|
SimpleSourceConnectorOutputTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendCommand(Path results,
Document command) |
protected void |
appendStop(Path results) |
protected void |
assertExpectedRecords(Path path,
int batchCount,
int recordsPerBatch) |
protected void |
assertFieldSchema(Document doc,
String fieldName,
org.apache.kafka.connect.data.Schema.Type type,
boolean optional) |
protected void |
assertOptionalFieldSchema(Document doc,
String fieldName,
org.apache.kafka.connect.data.Schema.Type type) |
protected void |
assertRequiredFieldSchema(Document doc,
String fieldName,
org.apache.kafka.connect.data.Schema.Type type) |
protected Properties |
readConfiguration(Path configFilePath) |
protected Array |
readResults(File file) |
void |
shouldGenerateExpected()
Run the connector with no known expected results so that it generates the results.
|
void |
shouldRunConnectorFromFilesAndFindMismatch()
Run the connector with connector configuration and expected results files, but find a mismatch in the results.
|
void |
shouldRunConnectorFromFilesInOneStep()
Run the connector with connector configuration and expected results files, which are read in one step.
|
void |
shouldRunConnectorFromFilesInOneStepWithTimestamps()
Run the connector with connector configuration and expected results files, which are read in one step.
|
void |
shouldRunConnectorFromFilesInTwoSteps()
Run the connector with connector configuration and expected results files, which are read in two steps.
|
protected void |
writeConfigurationFile(Path configFilePath,
Properties props) |
protected void |
writeConfigurationFileWithDefaultName(Path dir,
Properties props) |
protected void |
writeEnvironmentFileWithDefaultName(Path dir,
Properties props) |
addValueComparatorsByFieldPath, addValueComparatorsBySchemaName, afterEachTestMethod, cleanOffsetStorage, replaceVariables, runConnector, runConnector, runConnector, runConnector, runConnector, runConnector, usingSpec, usingSpec, usingSpec, usingSpec, usingSpecprotected static final String TOPIC_NAME
public void shouldGenerateExpected()
throws Exception
Exception - if there is an errorpublic void shouldRunConnectorFromFilesInOneStep()
public void shouldRunConnectorFromFilesInTwoSteps()
public void shouldRunConnectorFromFilesAndFindMismatch()
public void shouldRunConnectorFromFilesInOneStepWithTimestamps()
protected void writeConfigurationFileWithDefaultName(Path dir, Properties props) throws IOException
IOExceptionprotected void writeEnvironmentFileWithDefaultName(Path dir, Properties props) throws IOException
IOExceptionprotected void writeConfigurationFile(Path configFilePath, Properties props) throws IOException
IOExceptionprotected Properties readConfiguration(Path configFilePath) throws IOException
IOExceptionprotected void appendStop(Path results) throws IOException
IOExceptionprotected Array readResults(File file) throws IOException
IOExceptionprotected void appendCommand(Path results, Document command) throws IOException
IOExceptionprotected void assertExpectedRecords(Path path, int batchCount, int recordsPerBatch) throws IOException
IOExceptionprotected void assertFieldSchema(Document doc, String fieldName, org.apache.kafka.connect.data.Schema.Type type, boolean optional)
protected void assertRequiredFieldSchema(Document doc, String fieldName, org.apache.kafka.connect.data.Schema.Type type)
Copyright © 2016 JBoss by Red Hat. All rights reserved.