Skip to content

Commit

Permalink
Create webclients using jth wrapper (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
timja authored Apr 28, 2023
1 parent 44da409 commit 0b7132f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/test/java/hudson/maven/MavenProjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void testSiteBuild() throws Exception {
buildAndAssertSuccess(project);

// this should succeed
HudsonTestCase.WebClient wc = new WebClient();
HudsonTestCase.WebClient wc = createWebClient();
wc.getPage(project,"site");
wc.assertFails(project.getUrl() + "site/no-such-file", HttpURLConnection.HTTP_NOT_FOUND);
}
Expand All @@ -133,7 +133,7 @@ public void testMultiModuleSiteBuild() throws Exception {
}

// this should succeed
HudsonTestCase.WebClient wc = new WebClient();
HudsonTestCase.WebClient wc = createWebClient();
wc.getPage(project, "site");
wc.getPage(project, "site/core");
wc.getPage(project, "site/client");
Expand All @@ -160,7 +160,7 @@ public void testNestedMultiModuleSiteBuild() throws Exception {
}

// this should succeed
HudsonTestCase.WebClient wc = new WebClient();
HudsonTestCase.WebClient wc = createWebClient();
wc.getPage(project, "site");
wc.getPage(project, "site/core");
wc.getPage(project, "site/client");
Expand All @@ -185,7 +185,7 @@ public void testMultiModuleSiteBuildOnSlave() throws Exception {
}

// this should succeed
HudsonTestCase.WebClient wc = new WebClient();
HudsonTestCase.WebClient wc = createWebClient();
wc.getPage(project, "site");
wc.getPage(project, "site/core");
wc.getPage(project, "site/client");
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/hudson/maven/RedeployPublisherTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void testConfigRoundtrip() throws Exception {
MavenModuleSet p = j.jenkins.createProject(MavenModuleSet.class, "p");
RedeployPublisher rp = new RedeployPublisher("theId", "http://some.url/", true, true);
p.getPublishersList().add(rp);
j.submit(j.new WebClient().getPage(p,"configure").getFormByName("config"));
j.submit(j.createWebClient().getPage(p,"configure").getFormByName("config"));
j.assertEqualBeans(rp,p.getPublishersList().get(RedeployPublisher.class),"id,url,uniqueVersion,evenIfUnstable");
}

Expand Down

0 comments on commit 0b7132f

Please sign in to comment.