Ah,
Thanks, I'll add that.
I think that might be because jmock-junit4 changes the runner.
If I add

@RunWith(BlockJUnit4ClassRunner.class)
the the @ClassRule annotations get found.
It's documented at [1].

FYI
@RunWith(Suite.class)
@SuiteClasses({A.class, B.class, C.class})
public class CrankstartLaunchIT {

looks like a convenient way of starting 1 crankstart launch for a suite of
unit tests.

Best Regards
Ian



1 https://github.com/junit-team/junit4/wiki/Rules#classrule

On 8 April 2016 at 11:37, Bertrand Delacretaz <[email protected]>
wrote:

> Hi Ian,
>
> On Thu, Apr 7, 2016 at 6:30 PM, Ian Boston <[email protected]> wrote:
> > ...the crankstartSetup.before() is not called, hence the
> > crankstart never starts...
>
> Looks like a dependency is pulling an old version of JUnit, this patch
> fixes it for me:
>
> diff --git a/contrib/extensions/jobs/it/pom.xml
> b/contrib/extensions/jobs/it/pom.xml
> index 2a1dbe1..43f6cc8 100644
> --- a/contrib/extensions/jobs/it/pom.xml
> +++ b/contrib/extensions/jobs/it/pom.xml
> @@ -82,6 +82,12 @@
>              <artifactId>org.apache.sling.commons.testing</artifactId>
>              <version>2.0.16</version>
>              <scope>test</scope>
> +           <exclusions>
> +              <exclusion>
> +                 <groupId>org.jmock</groupId>
> +                 <artifactId>jmock-junit4</artifactId>
> +              </exclusion>
> +           </exclusions>
>          </dependency>
>          <dependency>
>
> -Bertrand
>

Reply via email to