[
https://issues.apache.org/jira/browse/METRON-1549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470399#comment-16470399
]
ASF GitHub Bot commented on METRON-1549:
----------------------------------------
Github user mmiklavc commented on a diff in the pull request:
https://github.com/apache/metron/pull/1009#discussion_r187332027
--- Diff:
metron-platform/metron-parsers/src/test/java/org/apache/metron/writers/integration/WriterBoltIntegrationTest.java
---
@@ -166,6 +185,139 @@ public void test() throws UnableToStartException,
IOException, ParseException {
}
}
+ /**
+ * {
+ *
"parserClassName":"org.apache.metron.writers.integration.WriterBoltIntegrationTest$EmptyObjectParser",
+ * "sensorTopic":"emptyobjectparser",
+ * "outputTopic": "enrichments",
+ * "errorTopic": "parser_error"
+ * }
+ */
+ @Multiline
+ public static String offsetParserConfigJSON;
+
+ @Test
+ public void commits_kafka_offsets_for_emtpy_objects() throws Exception {
+ final String sensorType = "emptyobjectparser";
+
+ SensorParserConfig parserConfig =
JSONUtils.INSTANCE.load(offsetParserConfigJSON, SensorParserConfig.class);
+
+ // the input messages to parser
+ final List<byte[]> inputMessages = new ArrayList<byte[]>() {{
+ add(Bytes.toBytes("foo"));
+ add(Bytes.toBytes("bar"));
+ add(Bytes.toBytes("baz"));
+ }};
+
+ // setup external components; zookeeper, kafka
+ final Properties topologyProperties = new Properties();
--- End diff --
I'll look at pulling common logic.
> Add empty object test to WriterBoltIntegrationTest implementation
> -----------------------------------------------------------------
>
> Key: METRON-1549
> URL: https://issues.apache.org/jira/browse/METRON-1549
> Project: Metron
> Issue Type: Test
> Reporter: Michael Miklavcic
> Assignee: Michael Miklavcic
> Priority: Major
>
> Verify expected output when empty objects returned by custom parsers.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)