Package org.jvnet.hudson.test
Class RestartableJenkinsRule
java.lang.Object
org.jvnet.hudson.test.RestartableJenkinsRule
- All Implemented Interfaces:
org.junit.rules.MethodRule
@Deprecated
public class RestartableJenkinsRule
extends Object
implements org.junit.rules.MethodRule
Deprecated.
- Since:
- 1.567
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Deprecated.static interface
Deprecated.One step to run, intended to be a SAM for lambdas withthen(org.jvnet.hudson.test.RestartableJenkinsRule.Step)
. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStep
(org.junit.runners.model.Statement step) Deprecated.void
addStep
(org.junit.runners.model.Statement step, boolean expectedToStartCorrectly) Deprecated.void
addStepWithDirtyShutdown
(org.junit.runners.model.Statement step) Deprecated.org.junit.runners.model.Statement
apply
(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod method, Object target) Deprecated.protected JenkinsRule
createJenkinsRule
(org.junit.runner.Description description) Deprecated.void
step
(groovy.lang.Closure<?> c) Deprecated.void
Deprecated.Run one Jenkins session and shut down.void
Deprecated.void
Deprecated.Run one Jenkins session and then simulate the Jenkins process ending without a clean shutdown.
-
Field Details
-
j
Deprecated. -
home
Deprecated.JENKINS_HOME
-
-
Constructor Details
-
RestartableJenkinsRule
public RestartableJenkinsRule()Deprecated.
-
-
Method Details
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod method, Object target) Deprecated.- Specified by:
apply
in interfaceorg.junit.rules.MethodRule
-
step
Deprecated. -
then
Deprecated.Run one Jenkins session and shut down.- Since:
- 2.24
-
thenWithHardShutdown
Deprecated.Run one Jenkins session and then simulate the Jenkins process ending without a clean shutdown. This can be used to test that data is appropriately persisted without relying on shutdown processes.Implementation note: we're actually just copying the JENKINS_HOME, which takes some time - so the shutdown isn't truly instant (additional data may be written while this happens).
-
thenDoesNotStart
public void thenDoesNotStart()Deprecated. -
addStep
Deprecated. -
addStep
@Deprecated public void addStep(org.junit.runners.model.Statement step, boolean expectedToStartCorrectly) Deprecated. -
addStepWithDirtyShutdown
Deprecated. -
createJenkinsRule
Deprecated.
-
JenkinsSessionRule
.RestartableJenkinsRule
will evaluate your test method to collect all steps, then execute them in turn and restart Jenkins in between each step, after the test method has exited. That is probably not what you would expect from looking at sources, and it will not work naturally withAfter
etc. Tests needing to dynamically disable plugins, simulate crashes, etc. are better written usingRealJenkinsRule
.