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

    https://github.com/apache/incubator-metron/pull/370#discussion_r90759556
  
    --- Diff: 
metron-platform/metron-common/src/test/java/org/apache/metron/common/stellar/StellarTest.java
 ---
    @@ -593,6 +595,39 @@ public void testStringFunctions_advanced() throws 
Exception {
       }
     
       @Test
    +  public void testLeftRightFills() throws Exception{
    +    final Map<String, Object> variableMap = new HashMap<String, Object>() 
{{
    +      put("foo", null);
    +      put("bar", null);
    +      put("notInt","oh my");
    +    }};
    +
    +    Object left = run("FILL_LEFT('123','X', 10)",new HashedMap());
    +    Object right = run("FILL_RIGHT('123','X', 10)", new HashedMap());
    +    Object same = run("FILL_RIGHT('123','X', 3)", new HashedMap());
    +    Object nullIn = run("FILL_RIGHT('123',foo,bar)", variableMap);
    +    Object notInt= run("FILL_RIGHT('123',foo, notInt)", variableMap);
    --- End diff --
    
    Would it make sense to add more tests for the failure behavior?  Like nulls 
for the length and fill arguments.  Also the case where the actual length is 
greater than the fill length. There's probably some other corner cases we could 
hit too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to