[ 
https://issues.apache.org/jira/browse/METRON-647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15798650#comment-15798650
 ] 

ASF GitHub Bot commented on METRON-647:
---------------------------------------

GitHub user justinleet opened a pull request:

    https://github.com/apache/incubator-metron/pull/412

    METRON-647 Parser unit test failures due to assumed year values

    Short term fix for the build, along with some cleanup noted in METRON-648 
(which was closed as a dupe of 647).
    
    Two classes are adjusted:
    
    `BasicAsaParserTest:testIp6Addr`: The rawMessage string has been adjusted 
to include 2016 explicitly.  In addition `assertTrue` has been replaced with 
`assertEquals` and params put in correct order.
    
    `GrokWebSphereParserTest`: Tests no longer use explicit timestamps, but 
instead generate a timestamp based on the current year (UTC timezone is used, 
because GrokParser defaults to UTC if no timezone is explicitly provided). 
Using current year is not desirable long term behavior, but the tests now match 
existing behavior and the build can succeed. In addition the order of params to 
`assertEquals` is corrected and values are no longer unnecessarily coerced.
    
    A follow-on ticket will be created for handling dates in a more robust 
manner.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/justinleet/incubator-metron METRON-647

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-metron/pull/412.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #412
    
----
commit 713e0297ff324d2a0a478ca89d600b05beb609c1
Author: justinjleet <[email protected]>
Date:   2017-01-04T15:49:10Z

    Altering unit tests to handle it being not 2016

----


> Parser unit test failures due to assumed year values
> ----------------------------------------------------
>
>                 Key: METRON-647
>                 URL: https://issues.apache.org/jira/browse/METRON-647
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Kyle Richardson
>            Assignee: Justin Leet
>            Priority: Blocker
>
> Unit Tests Failing:
> * BasicAsaParserTest.testIp6Addr:151
> * GrokWebSphereParserTest.testParseLoginLine:60 
> * GrokWebSphereParserTest.testParseMalformedLoginLine:151 
> * GrokWebSphereParserTest.tetsParseLogoutLine:84 
> * GrokWebSphereParserTest.tetsParseMalformedLogoutLine:175 
> * GrokWebSphereParserTest.tetsParseMalformedOtherLine:220 
> * GrokWebSphereParserTest.tetsParseMalformedRBMLine:198 
> * GrokWebSphereParserTest.tetsParseOtherLine:129 
> * GrokWebSphereParserTest.tetsParseRBMLine:107 
> The issue appears to be the same for all. The original syslog message did not 
> include a year (fairly common); however, we have hard coded an assertion 
> based on the year the code was written (in our case 2016).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to