> On Aug. 3, 2018, 7:54 a.m., András Piros wrote:
> > examples/pom.xml
> > Lines 108-112 (patched)
> > <https://reviews.apache.org/r/68180/diff/1/?file=2066736#file2066736line108>
> >
> >     Can you please look whether `com.github.stefanbirkner:system-rules` 
> > [CPL 
> > 1.0](https://github.com/stefanbirkner/system-rules/blob/master/LICENSE) is 
> > compatible with Apache 2.0?
> 
> Daniel Becker wrote:
>     The licence is not really compatible with Apache 2.0, maybe it would be 
> possible to include it somehow but I don't think this small use case is worth 
> the effort. Thanks for catching it.
>     
>     The possible solutions I can think of now are the following:
>         - instead of testing the main method, we could test the cli argument 
> validating method and the string generation; the drawback is that in order to 
> be testable, we have to change them from private to protected and that the 
> main method itself is not tested
>         - in the test method, we could set a SecurityManager that blocks 
> System.exit() and throws an exception instead which can be caught by junit; 
> the advantage of this approach is that it only affects the testing code, not 
> the production code - on the other hand, it looks like a hack, but may still 
> be worth doing.

A third option would be to launch the main class as a subprocess and check its 
return code.


- Daniel


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68180/#review206836
-----------------------------------------------------------


On Aug. 3, 2018, 6:38 a.m., Daniel Becker wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68180/
> -----------------------------------------------------------
> 
> (Updated Aug. 3, 2018, 6:38 a.m.)
> 
> 
> Review request for oozie and András Piros.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> -------
> 
> The oozie/examples/src/main/java/org/apache/oozie/example/DateList.java 
> produces a wrong action output:
> 
> ,2009-02-01T01:15Z,2009-02-01T01:30Z,2009-02-01T01:45Z,2009-02-01T02:00Z
> instead of
> 
> 2009-02-01T01:00Z,2009-02-01T01:15Z,2009-02-01T01:30Z,2009-02-01T01:45Z
> the first element is missing in the list (but not the separator). This is 
> caused by an off-by-one error introduced in OOZIE-2942.
> 
> 
> Diffs
> -----
> 
>   examples/pom.xml 680e3fb1 
>   examples/src/main/java/org/apache/oozie/example/DateList.java 731fe413 
>   examples/src/test/java/org/apache/oozie/example/TestDateList.java 
> PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/68180/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Daniel Becker
> 
>

Reply via email to