You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Kirk Lund <kl...@pivotal.io> on 2016/04/29 19:57:34 UTC
Need gradle expertise on checkMissedTests
I'm trying to change the *Test category on a test from UnitTest to
IntegrationTest, but doing so causes this file (and only this one) to fail
checkMissedTests.
Take a look at:
geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/controllers/PulseControllerJUnitTest.java
You'll see this test has a lot of annotations on the class:
@Category(UnitTest.class)
@PrepareForTest(Repository.class)
@RunWith(PowerMockRunner.class)
@PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
@PowerMockIgnore("*.UnitTest")
Any ideas why checkMissedTests fails when I change this to an
IntegrationTest?
@Category(IntegrationTest.class)
@PrepareForTest(Repository.class)
@RunWith(PowerMockRunner.class)
@PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
@PowerMockIgnore("*.UnitTest")
The following is the failure when it's marked as an IntegrationTest. If I
change it back to UnitTest, it passes checkMissedTests.
FAILURE: Build failed with an exception.
* Where:
Script '/Users/klund/dev/gemfire/open/gradle/test.gradle' line: 84
* What went wrong:
Execution failed for task ':geode-pulse:checkMissedTests'.
> The test
*com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.clearAlerts*
does not include a junit category.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output.
BUILD FAILED
Total time: 48.0 secs
-Kirk
Re: Need gradle expertise on checkMissedTests
Posted by Kirk Lund <kl...@pivotal.io>.
Works for me too, though I just ended up
with @PowerMockIgnore("*.IntegrationTest")
Thanks!
On Fri, Apr 29, 2016 at 11:22 AM, Jens Deppe <jd...@pivotal.io> wrote:
> Or, more readably:
>
> *@Category(IntegrationTest.class)*
> @PrepareForTest(Repository.class)
> @RunWith(PowerMockRunner.class)
> @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
> @WebAppConfiguration
> @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
> *@PowerMockIgnore({"*.IntegrationTest", "*.UnitTest"})*
>
>
>
>
> On Fri, Apr 29, 2016 at 11:21 AM, Jens Deppe <jd...@pivotal.io> wrote:
>
> > This works for me:
> >
> > @Category(IntegrationTest.class)
> > @PrepareForTest(Repository.class)
> > @RunWith(PowerMockRunner.class)
> > @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
> > @WebAppConfiguration
> > @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
> > @PowerMockIgnore({"*.IntegrationTest", "*.UnitTest"})
> >
> >
> > On Fri, Apr 29, 2016 at 11:07 AM, Jens Deppe <jd...@pivotal.io> wrote:
> >
> >> Did you try and mess with the PowerMockIgnore annotation?
> >>
> >> On Fri, Apr 29, 2016 at 10:57 AM, Kirk Lund <kl...@pivotal.io> wrote:
> >>
> >>> I'm trying to change the *Test category on a test from UnitTest to
> >>> IntegrationTest, but doing so causes this file (and only this one) to
> >>> fail
> >>> checkMissedTests.
> >>>
> >>> Take a look at:
> >>>
> >>>
> >>>
> geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/controllers/PulseControllerJUnitTest.java
> >>>
> >>> You'll see this test has a lot of annotations on the class:
> >>>
> >>> @Category(UnitTest.class)
> >>> @PrepareForTest(Repository.class)
> >>> @RunWith(PowerMockRunner.class)
> >>> @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
> >>> @WebAppConfiguration
> >>> @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
> >>> @PowerMockIgnore("*.UnitTest")
> >>>
> >>> Any ideas why checkMissedTests fails when I change this to an
> >>> IntegrationTest?
> >>>
> >>> @Category(IntegrationTest.class)
> >>> @PrepareForTest(Repository.class)
> >>> @RunWith(PowerMockRunner.class)
> >>> @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
> >>> @WebAppConfiguration
> >>> @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
> >>> @PowerMockIgnore("*.UnitTest")
> >>>
> >>> The following is the failure when it's marked as an IntegrationTest.
> If I
> >>> change it back to UnitTest, it passes checkMissedTests.
> >>>
> >>> FAILURE: Build failed with an exception.
> >>>
> >>> * Where:
> >>> Script '/Users/klund/dev/gemfire/open/gradle/test.gradle' line: 84
> >>>
> >>> * What went wrong:
> >>> Execution failed for task ':geode-pulse:checkMissedTests'.
> >>> > The test
> >>>
> >>>
> *com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.clearAlerts*
> >>> does not include a junit category.
> >>>
> >>> * Try:
> >>> Run with --stacktrace option to get the stack trace. Run with --info or
> >>> --debug option to get more log output.
> >>>
> >>> BUILD FAILED
> >>>
> >>> Total time: 48.0 secs
> >>>
> >>> -Kirk
> >>>
> >>
> >>
> >
>
Re: Need gradle expertise on checkMissedTests
Posted by Jens Deppe <jd...@pivotal.io>.
Or, more readably:
*@Category(IntegrationTest.class)*
@PrepareForTest(Repository.class)
@RunWith(PowerMockRunner.class)
@PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
*@PowerMockIgnore({"*.IntegrationTest", "*.UnitTest"})*
On Fri, Apr 29, 2016 at 11:21 AM, Jens Deppe <jd...@pivotal.io> wrote:
> This works for me:
>
> @Category(IntegrationTest.class)
> @PrepareForTest(Repository.class)
> @RunWith(PowerMockRunner.class)
> @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
> @WebAppConfiguration
> @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
> @PowerMockIgnore({"*.IntegrationTest", "*.UnitTest"})
>
>
> On Fri, Apr 29, 2016 at 11:07 AM, Jens Deppe <jd...@pivotal.io> wrote:
>
>> Did you try and mess with the PowerMockIgnore annotation?
>>
>> On Fri, Apr 29, 2016 at 10:57 AM, Kirk Lund <kl...@pivotal.io> wrote:
>>
>>> I'm trying to change the *Test category on a test from UnitTest to
>>> IntegrationTest, but doing so causes this file (and only this one) to
>>> fail
>>> checkMissedTests.
>>>
>>> Take a look at:
>>>
>>>
>>> geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/controllers/PulseControllerJUnitTest.java
>>>
>>> You'll see this test has a lot of annotations on the class:
>>>
>>> @Category(UnitTest.class)
>>> @PrepareForTest(Repository.class)
>>> @RunWith(PowerMockRunner.class)
>>> @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
>>> @WebAppConfiguration
>>> @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
>>> @PowerMockIgnore("*.UnitTest")
>>>
>>> Any ideas why checkMissedTests fails when I change this to an
>>> IntegrationTest?
>>>
>>> @Category(IntegrationTest.class)
>>> @PrepareForTest(Repository.class)
>>> @RunWith(PowerMockRunner.class)
>>> @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
>>> @WebAppConfiguration
>>> @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
>>> @PowerMockIgnore("*.UnitTest")
>>>
>>> The following is the failure when it's marked as an IntegrationTest. If I
>>> change it back to UnitTest, it passes checkMissedTests.
>>>
>>> FAILURE: Build failed with an exception.
>>>
>>> * Where:
>>> Script '/Users/klund/dev/gemfire/open/gradle/test.gradle' line: 84
>>>
>>> * What went wrong:
>>> Execution failed for task ':geode-pulse:checkMissedTests'.
>>> > The test
>>>
>>> *com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.clearAlerts*
>>> does not include a junit category.
>>>
>>> * Try:
>>> Run with --stacktrace option to get the stack trace. Run with --info or
>>> --debug option to get more log output.
>>>
>>> BUILD FAILED
>>>
>>> Total time: 48.0 secs
>>>
>>> -Kirk
>>>
>>
>>
>
Re: Need gradle expertise on checkMissedTests
Posted by Jens Deppe <jd...@pivotal.io>.
This works for me:
@Category(IntegrationTest.class)
@PrepareForTest(Repository.class)
@RunWith(PowerMockRunner.class)
@PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
@PowerMockIgnore({"*.IntegrationTest", "*.UnitTest"})
On Fri, Apr 29, 2016 at 11:07 AM, Jens Deppe <jd...@pivotal.io> wrote:
> Did you try and mess with the PowerMockIgnore annotation?
>
> On Fri, Apr 29, 2016 at 10:57 AM, Kirk Lund <kl...@pivotal.io> wrote:
>
>> I'm trying to change the *Test category on a test from UnitTest to
>> IntegrationTest, but doing so causes this file (and only this one) to fail
>> checkMissedTests.
>>
>> Take a look at:
>>
>>
>> geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/controllers/PulseControllerJUnitTest.java
>>
>> You'll see this test has a lot of annotations on the class:
>>
>> @Category(UnitTest.class)
>> @PrepareForTest(Repository.class)
>> @RunWith(PowerMockRunner.class)
>> @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
>> @WebAppConfiguration
>> @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
>> @PowerMockIgnore("*.UnitTest")
>>
>> Any ideas why checkMissedTests fails when I change this to an
>> IntegrationTest?
>>
>> @Category(IntegrationTest.class)
>> @PrepareForTest(Repository.class)
>> @RunWith(PowerMockRunner.class)
>> @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
>> @WebAppConfiguration
>> @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
>> @PowerMockIgnore("*.UnitTest")
>>
>> The following is the failure when it's marked as an IntegrationTest. If I
>> change it back to UnitTest, it passes checkMissedTests.
>>
>> FAILURE: Build failed with an exception.
>>
>> * Where:
>> Script '/Users/klund/dev/gemfire/open/gradle/test.gradle' line: 84
>>
>> * What went wrong:
>> Execution failed for task ':geode-pulse:checkMissedTests'.
>> > The test
>>
>> *com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.clearAlerts*
>> does not include a junit category.
>>
>> * Try:
>> Run with --stacktrace option to get the stack trace. Run with --info or
>> --debug option to get more log output.
>>
>> BUILD FAILED
>>
>> Total time: 48.0 secs
>>
>> -Kirk
>>
>
>
Re: Need gradle expertise on checkMissedTests
Posted by Kirk Lund <kl...@pivotal.io>.
I'm unsure what "@PowerMockIgnore("*.UnitTest")" is specifying. Is it
specifying PulseControllerJ*UnitTest* for ignore or is it specifying
@Category*(UnitTest.*class) for ignore?
-Kirk
On Fri, Apr 29, 2016 at 11:07 AM, Jens Deppe <jd...@pivotal.io> wrote:
> Did you try and mess with the PowerMockIgnore annotation?
>
> On Fri, Apr 29, 2016 at 10:57 AM, Kirk Lund <kl...@pivotal.io> wrote:
>
> > I'm trying to change the *Test category on a test from UnitTest to
> > IntegrationTest, but doing so causes this file (and only this one) to
> fail
> > checkMissedTests.
> >
> > Take a look at:
> >
> >
> >
> geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/controllers/PulseControllerJUnitTest.java
> >
> > You'll see this test has a lot of annotations on the class:
> >
> > @Category(UnitTest.class)
> > @PrepareForTest(Repository.class)
> > @RunWith(PowerMockRunner.class)
> > @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
> > @WebAppConfiguration
> > @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
> > @PowerMockIgnore("*.UnitTest")
> >
> > Any ideas why checkMissedTests fails when I change this to an
> > IntegrationTest?
> >
> > @Category(IntegrationTest.class)
> > @PrepareForTest(Repository.class)
> > @RunWith(PowerMockRunner.class)
> > @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
> > @WebAppConfiguration
> > @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
> > @PowerMockIgnore("*.UnitTest")
> >
> > The following is the failure when it's marked as an IntegrationTest. If I
> > change it back to UnitTest, it passes checkMissedTests.
> >
> > FAILURE: Build failed with an exception.
> >
> > * Where:
> > Script '/Users/klund/dev/gemfire/open/gradle/test.gradle' line: 84
> >
> > * What went wrong:
> > Execution failed for task ':geode-pulse:checkMissedTests'.
> > > The test
> >
> >
> *com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.clearAlerts*
> > does not include a junit category.
> >
> > * Try:
> > Run with --stacktrace option to get the stack trace. Run with --info or
> > --debug option to get more log output.
> >
> > BUILD FAILED
> >
> > Total time: 48.0 secs
> >
> > -Kirk
> >
>
Re: Need gradle expertise on checkMissedTests
Posted by Jens Deppe <jd...@pivotal.io>.
Did you try and mess with the PowerMockIgnore annotation?
On Fri, Apr 29, 2016 at 10:57 AM, Kirk Lund <kl...@pivotal.io> wrote:
> I'm trying to change the *Test category on a test from UnitTest to
> IntegrationTest, but doing so causes this file (and only this one) to fail
> checkMissedTests.
>
> Take a look at:
>
>
> geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/controllers/PulseControllerJUnitTest.java
>
> You'll see this test has a lot of annotations on the class:
>
> @Category(UnitTest.class)
> @PrepareForTest(Repository.class)
> @RunWith(PowerMockRunner.class)
> @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
> @WebAppConfiguration
> @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
> @PowerMockIgnore("*.UnitTest")
>
> Any ideas why checkMissedTests fails when I change this to an
> IntegrationTest?
>
> @Category(IntegrationTest.class)
> @PrepareForTest(Repository.class)
> @RunWith(PowerMockRunner.class)
> @PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
> @WebAppConfiguration
> @ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
> @PowerMockIgnore("*.UnitTest")
>
> The following is the failure when it's marked as an IntegrationTest. If I
> change it back to UnitTest, it passes checkMissedTests.
>
> FAILURE: Build failed with an exception.
>
> * Where:
> Script '/Users/klund/dev/gemfire/open/gradle/test.gradle' line: 84
>
> * What went wrong:
> Execution failed for task ':geode-pulse:checkMissedTests'.
> > The test
>
> *com.vmware.gemfire.tools.pulse.controllers.PulseControllerJUnitTest.clearAlerts*
> does not include a junit category.
>
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or
> --debug option to get more log output.
>
> BUILD FAILED
>
> Total time: 48.0 secs
>
> -Kirk
>