Works for me too, though I just ended up
with @PowerMockIgnore("*.IntegrationTest")Thanks! On Fri, Apr 29, 2016 at 11:22 AM, Jens Deppe <[email protected]> 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 <[email protected]> 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 <[email protected]> wrote: > > > >> Did you try and mess with the PowerMockIgnore annotation? > >> > >> On Fri, Apr 29, 2016 at 10:57 AM, Kirk Lund <[email protected]> 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 > >>> > >> > >> > > >
