[ https://issues.apache.org/jira/browse/METRON-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15582384#comment-15582384 ]
ASF GitHub Bot commented on METRON-502: --------------------------------------- Github user ottobackwards commented on a diff in the pull request: https://github.com/apache/incubator-metron/pull/311#discussion_r83652542 --- Diff: metron-platform/metron-enrichment/src/test/java/org/apache/metron/enrichment/integration/EnrichmentIntegrationTest.java --- @@ -160,16 +159,36 @@ public void test() throws Exception { fluxComponent.submitTopology(); kafkaComponent.writeMessages(Constants.ENRICHMENT_TOPIC, inputMessages); - List<Map<String, Object>> docs = runner.process(getProcessor(inputMessages)); - Assert.assertEquals(inputMessages.size(), docs.size()); - List<Map<String, Object>> cleanedDocs = docs; - validateAll(cleanedDocs); - } - finally { + ProcessorResult<List<Map<String, Object>>> result = runner.process(getProcessor(inputMessages)); + List<Map<String, Object>> docs = result.getResult(); + if (result.failed()){ + result.printBadResults(); + System.out.println(String.format("%d Valid Messages Processed", docs.size())); --- End diff -- So, print to err and not out in the printBadResults()? I discuss the accumulating function below > Make the ParserIntegrationTest more clear on errors > --------------------------------------------------- > > Key: METRON-502 > URL: https://issues.apache.org/jira/browse/METRON-502 > Project: Metron > Issue Type: Improvement > Affects Versions: 0.2.1BETA > Reporter: Casey Stella > > Right now the ParserIntegrationTest fails if it does not receive the expected > number of messages after a given amount of time. In situations where > messages get redirected to the error or invalid queues, this results in the > test waiting and failing at the end of a timeout. The developer cannot > determine if the cause is a timeout or actual errors. > We should, instead, dump out the error and invalid queue as soon as it > becomes populated and fail the test with more specific reason. -- This message was sent by Atlassian JIRA (v6.3.4#6332)