Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare tests for newer core/BOM #2586

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.junit.Test;
import org.jvnet.hudson.test.MockFolder;

import java.io.IOException;
import java.util.List;

/**
Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ protected User login() throws IOException {
return login("bob", "Bob Smith", "[email protected]");
}

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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down