Konstantin Boudnik created BIGTOP-2233:
------------------------------------------

             Summary: Fix BIGTOP-2009
                 Key: BIGTOP-2233
                 URL: https://issues.apache.org/jira/browse/BIGTOP-2233
             Project: Bigtop
          Issue Type: Bug
            Reporter: Konstantin Boudnik


While working on BIGTOP-2232, I have came across BIGTOP-2009 fix. Well, despite 
wrong formatting (which needs to be fixed separately) I have found a couple of 
truly amazing code examples. Here it is:
- the patch introduces a function to look through a collection of Strings and 
find a partial match. Naturally, the function return type is boolean
- the best part is how this function is used in {{assertTrue}} calls. Hold 
on....
{code}
                scripts.lookForGivenString(sh.getOut(),
                                          ".test_4.txt.crc") == true);
{code}
In other words, let's assert the {{functionWithBooleanReturnType() == true}}. 
Guess what? The function already returns boolean. You don't need to compare it 
to a logic constant.

well, besides, instead of inventing a square wheel, let's just use grep. After 
all, these new tests are supposedly written in Groovy.



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

Reply via email to