Skip to content
Commit 26276d13 authored by Kohsuke Kawaguchi's avatar Kohsuke Kawaguchi
Browse files

added a backward compatibility with MethodRule.

Without this, I saw:

FAILURE: initializationError(hudson.model.CauseTest)
[INFO] java.lang.Exception: Field j must implement MethodRule
[INFO] 	at org.junit.runners.BlockJUnit4ClassRunner.validateRuleField(BlockJUnit4ClassRunner.java:188)
[INFO] 	at org.junit.runners.BlockJUnit4ClassRunner.validateFields(BlockJUnit4ClassRunner.java:183)
[INFO] 	at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:123)
[INFO] 	at org.junit.runners.ParentRunner.validate(ParentRunner.java:269)
[INFO] 	at org.junit.runners.ParentRunner.<init>(ParentRunner.java:66)
[INFO] 	at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:58)
[INFO] 	at org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.java:13)
[INFO] 	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
[INFO] 	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
[INFO] 	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
[INFO] 	at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
[INFO] 	at junit.framework.JUnit4TestAdapter.<init>(JUnit4TestAdapter.java:31)
[INFO] 	at junit.framework.JUnit4TestAdapter.<init>(JUnit4TestAdapter.java:24)
[INFO] 	at com.sun.maven.junit.LocalTestCaseRunner.buildMethodTestCase(LocalTestCaseRunner.java:121)
[INFO] 	at com.sun.maven.junit.LocalTestCaseRunner.buildTestCase(LocalTestCaseRunner.java:83)
[INFO] 	at com.sun.maven.junit.LocalTestCaseRunner.runTestCase(LocalTestCaseRunner.java:62)
[INFO] 	at com.sun.maven.junit.LocalTestCaseRunner.runTestCase(LocalTestCaseRunner.java:58)
[INFO] 	at sun.reflect.GeneratedMethodAccessor334.invoke(Unknown Source)
[INFO] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[INFO] 	at java.lang.reflect.Method.invoke(Method.java:597)
[INFO] 	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
[INFO] 	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255)
[INFO] 	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
[INFO] 	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
[INFO] 	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
[INFO] 	at hudson.remoting.Request$2.run(Request.java:270)
[INFO] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[INFO] 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[INFO] 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[INFO] 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[INFO] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[INFO] 	at java.lang.Thread.run(Thread.java:662)
parent 7f8fe215
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment