diff --git a/src/test/java/org/jenkinsci/plugins/parallel_test_executor/DontBuildBranchBuildStrategy.java b/src/test/java/org/jenkinsci/plugins/parallel_test_executor/DontBuildBranchBuildStrategy.java index b1a4ab59..614abb96 100644 --- a/src/test/java/org/jenkinsci/plugins/parallel_test_executor/DontBuildBranchBuildStrategy.java +++ b/src/test/java/org/jenkinsci/plugins/parallel_test_executor/DontBuildBranchBuildStrategy.java @@ -5,16 +5,9 @@ import jenkins.branch.BranchBuildStrategyDescriptor; import jenkins.scm.api.SCMHead; import jenkins.scm.api.SCMSource; -import net.sf.json.JSONObject; -import org.kohsuke.stapler.StaplerRequest; - -import javax.annotation.CheckForNull; -import javax.annotation.Nonnull; public class DontBuildBranchBuildStrategy extends BranchBuildStrategy { - static final DontBuildBranchBuildStrategy INSTANCE = new DontBuildBranchBuildStrategy(); - @Override public boolean isAutomaticBuild(SCMSource source, SCMHead head) { // never ever build automatically @@ -22,16 +15,5 @@ public boolean isAutomaticBuild(SCMSource source, SCMHead head) { } @Extension - public static class DescriptorImpl extends BranchBuildStrategyDescriptor { - @Nonnull - @Override - public String getDisplayName() { - return "Hello"; - } - - @Override - public BranchBuildStrategy newInstance(@CheckForNull StaplerRequest req, @Nonnull JSONObject formData) throws FormException { - return INSTANCE; - } - } + public static class DescriptorImpl extends BranchBuildStrategyDescriptor { } } diff --git a/src/test/java/org/jenkinsci/plugins/parallel_test_executor/ParallelTestExecutorTest.java b/src/test/java/org/jenkinsci/plugins/parallel_test_executor/ParallelTestExecutorTest.java index baf19ccf..ae4a600e 100644 --- a/src/test/java/org/jenkinsci/plugins/parallel_test_executor/ParallelTestExecutorTest.java +++ b/src/test/java/org/jenkinsci/plugins/parallel_test_executor/ParallelTestExecutorTest.java @@ -1,17 +1,13 @@ package org.jenkinsci.plugins.parallel_test_executor; -import hudson.Extension; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import hudson.model.FreeStyleProject; import jenkins.branch.BranchBuildStrategy; -import jenkins.branch.BranchBuildStrategyDescriptor; import jenkins.branch.BranchSource; -import jenkins.branch.MultiBranchProject; import jenkins.plugins.git.GitSCMSource; import jenkins.plugins.git.GitSampleRepoRule; -import jenkins.scm.api.SCMHead; -import jenkins.scm.api.SCMSource; -import jenkins.scm.api.SCMSourceDescriptor; -import net.sf.json.JSONObject; import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition; import org.jenkinsci.plugins.workflow.cps.SnippetizerTester; import org.jenkinsci.plugins.workflow.job.WorkflowJob; @@ -21,17 +17,8 @@ import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; import org.jvnet.hudson.test.recipes.LocalData; -import org.kohsuke.stapler.StaplerRequest; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.io.Serializable; import java.util.ArrayList; -import java.util.Arrays; - -import javax.annotation.CheckForNull; -import javax.annotation.Nonnull; public class ParallelTestExecutorTest {