diff --git a/blueocean-events/src/test/java/io/jenkins/blueocean/events/SseEventTest.java b/blueocean-events/src/test/java/io/jenkins/blueocean/events/SseEventTest.java index f31bcb8652d..1ca98667e0b 100644 --- a/blueocean-events/src/test/java/io/jenkins/blueocean/events/SseEventTest.java +++ b/blueocean-events/src/test/java/io/jenkins/blueocean/events/SseEventTest.java @@ -14,7 +14,6 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; import edu.umd.cs.findbugs.annotations.NonNull; import jenkins.branch.BranchProperty; @@ -135,7 +134,7 @@ public void jobRunEvents() throws IOException, ExecutionException, InterruptedEx } @Test - public void pipelineWithInput() throws IOException, ExecutionException, InterruptedException, TimeoutException { + public void pipelineWithInput() throws Exception { final OneShotEvent success = new OneShotEvent(); String script = "node {\n" + diff --git a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/CredentialApiTest.java b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/CredentialApiTest.java index 5d597035c9e..c05c208643a 100644 --- a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/CredentialApiTest.java +++ b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/CredentialApiTest.java @@ -31,7 +31,7 @@ public class CredentialApiTest extends PipelineBaseTest { @Test - public void listCredentials() throws IOException { + public void listCredentials() throws Exception { SystemCredentialsProvider.ProviderImpl system = ExtensionList.lookup(CredentialsProvider.class).get(SystemCredentialsProvider.ProviderImpl.class); CredentialsStore systemStore = system.getStore(j.getInstance()); systemStore.addDomain(new Domain("domain1", null, null)); @@ -59,7 +59,7 @@ public void listCredentials() throws IOException { } @Test - public void listAllCredentials() throws IOException { + public void listAllCredentials() throws Exception { SystemCredentialsProvider.ProviderImpl system = ExtensionList.lookup(CredentialsProvider.class).get(SystemCredentialsProvider.ProviderImpl.class); CredentialsStore systemStore = system.getStore(j.getInstance()); systemStore.addDomain(new Domain("domain1", null, null)); diff --git a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/GraphBuilderTest.java b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/GraphBuilderTest.java index 37d1e3626a6..17d41b10a48 100644 --- a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/GraphBuilderTest.java +++ b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/GraphBuilderTest.java @@ -542,7 +542,7 @@ private WorkflowRun createAndRunJob(String jobName, String jenkinsFileName, Resu return job.getLastBuild(); } - private WorkflowJob createJob(String jobName, String jenkinsFileName) throws java.io.IOException { + private WorkflowJob createJob(String jobName, String jenkinsFileName) throws Exception { WorkflowJob job = j.createProject(WorkflowJob.class, jobName); URL resource = getClass().getResource(jenkinsFileName); diff --git a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/LinkResolverTest.java b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/LinkResolverTest.java index f1f9a781de8..1c2e2c3ba68 100644 --- a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/LinkResolverTest.java +++ b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/LinkResolverTest.java @@ -14,7 +14,6 @@ import org.junit.Test; import org.jvnet.hudson.test.MockFolder; -import java.io.IOException; import java.util.List; /** @@ -28,7 +27,7 @@ public void setup() throws Exception { } @Test - public void nestedFolderJobLinkResolveTest() throws IOException { + public void nestedFolderJobLinkResolveTest() throws Exception { Project f = j.createFreeStyleProject("fstyle1"); MockFolder folder1 = j.createFolder("folder1"); Project p1 = folder1.createProject(FreeStyleProject.class, "test1"); diff --git a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineBaseTest.java b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineBaseTest.java index b352c5660f5..3fa6bead95b 100644 --- a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineBaseTest.java +++ b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineBaseTest.java @@ -647,7 +647,7 @@ protected User login() throws IOException { return login("bob", "Bob Smith", "bob@jenkins-ci.org"); } - protected WorkflowJob createWorkflowJobWithJenkinsfile(Class contextClass, String jenkinsFileName) throws java.io.IOException { + protected WorkflowJob createWorkflowJobWithJenkinsfile(Class contextClass, String jenkinsFileName) throws Exception { WorkflowJob p = j.createProject(WorkflowJob.class, "project-" + UUID.randomUUID()); URL resource = contextClass.getResource(jenkinsFileName); String jenkinsFile = IOUtils.toString(resource, StandardCharsets.UTF_8); diff --git a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/analytics/PipelinePluginAnalyticsTest.java b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/analytics/PipelinePluginAnalyticsTest.java index fe8dce37c79..b40045b20a5 100644 --- a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/analytics/PipelinePluginAnalyticsTest.java +++ b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/analytics/PipelinePluginAnalyticsTest.java @@ -71,7 +71,7 @@ public void testGeneratedAnalyticsEventWithScriptedFunction() throws Exception { Assert.assertEquals("runResult", "SUCCESS", properties.get("runResult")); } - private void createAndRunPipeline(String jenkinsFileName) throws java.io.IOException, InterruptedException, java.util.concurrent.ExecutionException { + private void createAndRunPipeline(String jenkinsFileName) throws Exception { // Create the pipeline and run it WorkflowJob scriptedSingle = createWorkflowJobWithJenkinsfile(getClass(), jenkinsFileName); WorkflowRun scriptedSingleRun = scriptedSingle.scheduleBuild2(0, new CauseAction()).waitForStart();