We currently test Span CLA by invoking SpanCLA.main and checking its behaviour. This leads to some unique challenges, like avoiding double initialization of configuration paths, or dealing with those times when SpanCLA.main decides to call System.exit(1) (this kills the whole JUnit instance, skipping any further tests). This is because main was explicitly designed to be the entrypoint method and doesn't play nice when it isn't.
As an alternative, we could change the CLA testing to invoke the assembled JAR as a subprocess. Since we only look at stdout/stderr and the files created, this wouldn't reduce our capabilities.
We currently test Span CLA by invoking
SpanCLA.main
and checking its behaviour. This leads to some unique challenges, like avoiding double initialization of configuration paths, or dealing with those times whenSpanCLA.main
decides to callSystem.exit(1)
(this kills the whole JUnit instance, skipping any further tests). This is becausemain
was explicitly designed to be the entrypoint method and doesn't play nice when it isn't.As an alternative, we could change the CLA testing to invoke the assembled JAR as a subprocess. Since we only look at stdout/stderr and the files created, this wouldn't reduce our capabilities.