Skip to content

Commit

Permalink
Merge pull request #371 from dwnusbaum/JENKINS-47448
Browse files Browse the repository at this point in the history
[JENKINS-47448] Fix JdkTest#autoinstallJDK
  • Loading branch information
olivergondza committed Oct 18, 2017
2 parents 9c9686c + 8895e7f commit 232f788
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -38,7 +38,7 @@ public ToolInstallation installVersion(String version) {
}

public void setCredentials(String login, String password) {
getPage().visit("descriptorByName/hudson.tools.JDKInstaller/enterCredential");
getPage().visit("/descriptorByName/hudson.tools.JDKInstaller/enterCredential");
find(by.input("username")).sendKeys(login);
find(by.input("password")).sendKeys(password);
clickButton("OK");
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/core/JdkTest.java
Expand Up @@ -12,14 +12,14 @@ public class JdkTest extends AbstractJUnitTest {

@Test @TestActivation({"ORACLE_LOGIN", "ORACLE_PASSWORD"})
public void autoinstallJdk() {
final String login = System.getenv("ORACLE_LOGIN");
final String passwd = System.getenv("ORACLE_PASSWORD");
final String login = System.getProperty("JdkTest.ORACLE_LOGIN");
final String passwd = System.getProperty("JdkTest.ORACLE_PASSWORD");

ToolInstallation.waitForUpdates(jenkins, JdkInstallation.class);

JdkInstallation jdk = ToolInstallation.addTool(jenkins, JdkInstallation.class);
jdk.name.set("jdk_1.7.0");
jdk.installVersion("jdk-7u11-oth-JPR");
jdk.name.set("jdk_1.8.0");
jdk.installVersion("jdk-8u141-oth-JPR");
jdk.getPage().save();

jdk.setCredentials(login, passwd);
Expand All @@ -31,7 +31,7 @@ public void autoinstallJdk() {

int tenMinutes = 600000;
job.startBuild().waitUntilFinished(tenMinutes).shouldSucceed()
.shouldContainsConsoleOutput("Installing JDK jdk-7u11-oth-JPR")
.shouldContainsConsoleOutput("Installing JDK jdk-8u141-oth-JPR")
.shouldContainsConsoleOutput("Downloading JDK from http://download.oracle.com")
;
}
Expand Down

0 comments on commit 232f788

Please sign in to comment.