You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aurora.apache.org by Zane Silver <zs...@luminatewireless.com> on 2016/02/17 19:45:57 UTC

Run a Single Java Test

Hi developers, I'm trying to figure out how to run a single java test with
gradlew. I'm sure there's a simple answer to my question, but I can seem to
figure this one out.

Specifically, I'm trying to run the scheduler tests in
(/src/test/java/org/apache/aurora/scheduler) ResourcesTest.java. I've tried
the following (and variation) to no avail:

$ ./gradlew test --tests org.apache.aurora.scheduler.Resources*

...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':commons:test'.
> No tests found for given includes:
[org.apache.aurora.scheduler.Resources*]
...


I appreciate the help!

Re: Run a Single Java Test

Posted by Zane Silver <zs...@luminatewireless.com>.
Problem solved, a ./gradlew clean and then test retry (same test command
below) solved the issue. Thanks for the reply!

On Wed, Feb 17, 2016 at 11:00 AM, Bill Farner <wf...@apache.org> wrote:

> Interesting.  That command works fine for me.  (Well, it fails - but
> because a test coverage task erroneously runs.)  What git sha are you at?
>
> On Wed, Feb 17, 2016 at 10:45 AM, Zane Silver <
> zsilver@luminatewireless.com>
> wrote:
>
> > Hi developers, I'm trying to figure out how to run a single java test
> with
> > gradlew. I'm sure there's a simple answer to my question, but I can seem
> to
> > figure this one out.
> >
> > Specifically, I'm trying to run the scheduler tests in
> > (/src/test/java/org/apache/aurora/scheduler) ResourcesTest.java. I've
> tried
> > the following (and variation) to no avail:
> >
> > $ ./gradlew test --tests org.apache.aurora.scheduler.Resources*
> >
> > ...
> >
> > FAILURE: Build failed with an exception.
> >
> > * What went wrong:
> > Execution failed for task ':commons:test'.
> > > No tests found for given includes:
> > [org.apache.aurora.scheduler.Resources*]
> > ...
> >
> >
> > I appreciate the help!
> >
>

Re: Run a Single Java Test

Posted by Bill Farner <wf...@apache.org>.
Interesting.  That command works fine for me.  (Well, it fails - but
because a test coverage task erroneously runs.)  What git sha are you at?

On Wed, Feb 17, 2016 at 10:45 AM, Zane Silver <zs...@luminatewireless.com>
wrote:

> Hi developers, I'm trying to figure out how to run a single java test with
> gradlew. I'm sure there's a simple answer to my question, but I can seem to
> figure this one out.
>
> Specifically, I'm trying to run the scheduler tests in
> (/src/test/java/org/apache/aurora/scheduler) ResourcesTest.java. I've tried
> the following (and variation) to no avail:
>
> $ ./gradlew test --tests org.apache.aurora.scheduler.Resources*
>
> ...
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Execution failed for task ':commons:test'.
> > No tests found for given includes:
> [org.apache.aurora.scheduler.Resources*]
> ...
>
>
> I appreciate the help!
>