ASF GitHub Bot commented on METRON-502:

Github user ottobackwards commented on a diff in the pull request:

    --- Diff: 
    @@ -160,16 +159,36 @@ public void test() throws Exception {
    -      List<Map<String, Object>> docs = 
    -      Assert.assertEquals(inputMessages.size(), docs.size());
    -      List<Map<String, Object>> cleanedDocs = docs;
    -      validateAll(cleanedDocs);
    -    }
    -    finally {
    +      ProcessorResult<List<Map<String, Object>>> result = 
    +      List<Map<String, Object>> docs = result.getResult();
    +      if (result.failed()){
    +        result.printBadResults();
    +        System.out.println(String.format("%d Valid Messages Processed", 
    --- 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

Reply via email to