From a86a4310ab3a45183c5b67fe86bf2d5d29dcc3fd Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Tue, 29 Oct 2019 20:23:32 +0200 Subject: [PATCH 01/15] [JENKINS-59347] Move acceptance tests from ATH --- Jenkinsfile | 14 ++ pom.xml | 17 ++ .../ExternalWorkspaceManagerPluginTest.java | 170 ++++++++++++++++++ .../config/ExternalGlobalConfig.java | 33 ++++ .../acceptance/config/ExternalNodeConfig.java | 33 ++++ 5 files changed, 267 insertions(+) create mode 100644 src/test/java/org/jenkinsci/plugins/ewm/acceptance/ExternalWorkspaceManagerPluginTest.java create mode 100644 src/test/java/org/jenkinsci/plugins/ewm/acceptance/config/ExternalGlobalConfig.java create mode 100644 src/test/java/org/jenkinsci/plugins/ewm/acceptance/config/ExternalNodeConfig.java diff --git a/Jenkinsfile b/Jenkinsfile index a229fa51..d3a34cc5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1 +1,15 @@ buildPlugin() + +stage("UI tests") { + node('docker && highmem') { + checkout scm + docker.image('jenkins/ath:acceptance-test-harness-1.65').inside('-v /var/run/docker.sock:/var/run/docker.sock --shm-size 2g') { + sh """ + mvn clean package -DskipTests # Build .hpi before running ATH so the snapshot is consumed instead of latest released + eval \$(vnc.sh) + mvn test -B -Dmaven.test.failure.ignore=true -DforkCount=1 -Ptest-ath + """ + } + junit '**/target/surefire-reports/**/*.xml' + } +} diff --git a/pom.xml b/pom.xml index b3fc426b..e0a6a397 100644 --- a/pom.xml +++ b/pom.xml @@ -16,6 +16,8 @@ 2.150.3 8 -Xmx1024m + + !ExternalWorkspaceManagerPluginTest External Workspace Manager Plugin @@ -149,6 +151,21 @@ tests test + + org.jenkins-ci + acceptance-test-harness + 1.69 + test + + + + test-ath + + ExternalWorkspaceManagerPluginTest + + + + diff --git a/src/test/java/org/jenkinsci/plugins/ewm/acceptance/ExternalWorkspaceManagerPluginTest.java b/src/test/java/org/jenkinsci/plugins/ewm/acceptance/ExternalWorkspaceManagerPluginTest.java new file mode 100644 index 00000000..2d256416 --- /dev/null +++ b/src/test/java/org/jenkinsci/plugins/ewm/acceptance/ExternalWorkspaceManagerPluginTest.java @@ -0,0 +1,170 @@ +package org.jenkinsci.plugins.ewm.acceptance; + +import org.jenkinsci.plugins.ewm.acceptance.config.ExternalGlobalConfig; +import org.jenkinsci.plugins.ewm.acceptance.config.ExternalNodeConfig; +import org.jenkinsci.test.acceptance.junit.AbstractJUnitTest; +import org.jenkinsci.test.acceptance.junit.WithPlugins; +import org.jenkinsci.test.acceptance.plugins.maven.MavenInstallation; +import org.jenkinsci.test.acceptance.po.Build; +import org.jenkinsci.test.acceptance.po.Slave; +import org.jenkinsci.test.acceptance.po.WorkflowJob; +import org.jenkinsci.test.acceptance.slave.LocalSlaveController; +import org.jenkinsci.test.acceptance.slave.SlaveController; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; +import org.openqa.selenium.By; + +import java.util.concurrent.ExecutionException; + +import static org.apache.commons.io.FileUtils.listFiles; +import static org.apache.commons.io.filefilter.FileFilterUtils.directoryFileFilter; +import static org.apache.commons.io.filefilter.FileFilterUtils.nameFileFilter; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.core.StringContains.containsString; +import static org.junit.Assert.assertThat; + +/** + * Acceptance tests for External Workspace Manager Plugin. + * + * @author Alexandru Somai + */ +@WithPlugins({"workflow-aggregator", "external-workspace-manager", "run-selector", "ws-cleanup", "git"}) +public class ExternalWorkspaceManagerPluginTest extends AbstractJUnitTest { + + @ClassRule + public static TemporaryFolder tmp = new TemporaryFolder(); + + private static final String DISK_POOL_ID = "diskpool1"; + private static final String DISK_ONE = "disk1"; + private static final String DISK_TWO = "disk2"; + private static final String MOUNT_FROM_MASTER_TO_DISK_ONE = "/fake-mount-point-1"; + private static final String MOUNT_FROM_MASTER_TO_DISK_TWO = "/fake-mount-point-2"; + + private String fakeNodeMountingPoint; + + @Before + public void setUp() throws Exception { + MavenInstallation.installMaven(jenkins, "M3", "3.1.0"); + + setUpGlobalConfig(); + + fakeNodeMountingPoint = tmp.newFolder().getAbsolutePath(); + setUpNode("linux", fakeNodeMountingPoint); + setUpNode("test", fakeNodeMountingPoint); + } + + @Test + public void shareWorkspaceOneJobTwoNodes() { + WorkflowJob job = createWorkflowJob(String.format( + "def extWorkspace = exwsAllocate '%s' \n" + + "node ('linux') { \n" + + " exws (extWorkspace) { \n" + + " writeFile file: 'marker', text: 'content' \n" + + " } \n" + + "} \n" + + "node ('test') { \n" + + " exws (extWorkspace) { \n" + + " def content = readFile(file: 'marker') \n" + + " if (content != 'content') error('Content mismatch: ' + content) \n" + + " } \n" + + "}", DISK_POOL_ID)); + + Build build = job.startBuild(); + build.shouldSucceed(); + assertThat(build.getConsole(), containsString(String.format("Running in %s/%s/%s", fakeNodeMountingPoint, job.name, build.getNumber()))); + + verifyExternalWorkspacesAction(job.name, build); + } + + @Test + public void shareWorkspaceTwoJobsTwoNodes() { + WorkflowJob upstreamJob = createWorkflowJob(String.format( + "def extWorkspace = exwsAllocate '%s' \n" + + "node ('linux') { \n" + + " exws (extWorkspace) { \n" + + " writeFile file: 'marker', text: 'content' \n " + + " } \n" + + "}", DISK_POOL_ID)); + + Build upstreamBuild = upstreamJob.startBuild(); + upstreamBuild.shouldSucceed(); + assertThat(upstreamBuild.getConsole(), containsString(String.format("Running in %s/%s/%s", fakeNodeMountingPoint, upstreamJob.name, upstreamBuild.getNumber()))); + verifyExternalWorkspacesAction(upstreamJob.name, upstreamBuild); + + WorkflowJob downstreamJob = createWorkflowJob(String.format("" + + "def run = selectRun '%s' \n" + + "def extWorkspace = exwsAllocate selectedRun: run \n" + + "node ('test') { \n" + + " exws (extWorkspace) { \n" + + " def content = readFile(file: 'marker') \n" + + " if (content != 'content') error('Content mismatch: ' + content) \n" + + " } \n" + + "}", upstreamJob.name)); + + Build downstreamBuild = downstreamJob.startBuild(); + downstreamBuild.shouldSucceed(); + assertThat(downstreamBuild.getConsole(), containsString(String.format("Running in %s/%s/%s", fakeNodeMountingPoint, upstreamJob.name, upstreamBuild.getNumber()))); + verifyExternalWorkspacesAction(upstreamJob.name, downstreamBuild); + } + + @Test + public void externalWorkspaceCleanup() { + WorkflowJob job = createWorkflowJob(String.format("" + + "def extWorkspace = exwsAllocate '%s' \n" + + "node ('linux') { \n" + + " exws (extWorkspace) { \n" + + " try { \n" + + " writeFile file: 'foobar.txt', text: 'any' \n" + + " } finally { \n" + + " step ([$class: 'WsCleanup']) \n" + + " } \n" + + " } \n" + + "}", DISK_POOL_ID)); + + Build build = job.startBuild(); + build.shouldSucceed(); + String console = build.getConsole(); + assertThat(console, containsString(String.format("Running in %s/%s/%s", fakeNodeMountingPoint, job.name, build.getNumber()))); + assertThat(console, containsString("[WS-CLEANUP] Deleting project workspace")); + assertThat(console, containsString("[WS-CLEANUP] done")); + assertThat(listFiles(tmp.getRoot(), nameFileFilter("foobar.txt"), directoryFileFilter()), hasSize(0)); + } + + private void setUpGlobalConfig() { + jenkins.configure(); + ExternalGlobalConfig globalConfig = new ExternalGlobalConfig(jenkins.getConfigPage()); + globalConfig.addDiskPool(DISK_POOL_ID, DISK_ONE, DISK_TWO, MOUNT_FROM_MASTER_TO_DISK_ONE, MOUNT_FROM_MASTER_TO_DISK_TWO); + jenkins.save(); + } + + private void setUpNode(String label, String fakeMountingPoint) throws ExecutionException, InterruptedException { + SlaveController controller = new LocalSlaveController(); + Slave linuxSlave = controller.install(jenkins).get(); + linuxSlave.configure(); + linuxSlave.setLabels(label); + + ExternalNodeConfig nodeConfig = new ExternalNodeConfig(linuxSlave); + nodeConfig.setConfig(DISK_POOL_ID, DISK_ONE, DISK_TWO, fakeMountingPoint); + linuxSlave.save(); + } + + private WorkflowJob createWorkflowJob(String script) { + WorkflowJob job = jenkins.jobs.create(WorkflowJob.class); + job.script.set(script); + job.save(); + + return job; + } + + private void verifyExternalWorkspacesAction(String jobName, Build build) { + build.visit("exwsAllocate"); + String exwsAllocateText = driver.findElement(By.id("main-panel")).getText(); + assertThat(exwsAllocateText, containsString(String.format("Disk Pool ID: %s", DISK_POOL_ID))); + assertThat(exwsAllocateText, containsString(String.format("Disk ID: %s", DISK_ONE))); + assertThat(exwsAllocateText, containsString(String.format("Workspace path on %s: %s/%s", DISK_ONE, jobName, build.getNumber()))); + assertThat(exwsAllocateText, containsString(String.format("Complete workspace path on %s (from Jenkins master): %s/%s/%s", + DISK_ONE, MOUNT_FROM_MASTER_TO_DISK_ONE, jobName, build.getNumber()))); + } +} diff --git a/src/test/java/org/jenkinsci/plugins/ewm/acceptance/config/ExternalGlobalConfig.java b/src/test/java/org/jenkinsci/plugins/ewm/acceptance/config/ExternalGlobalConfig.java new file mode 100644 index 00000000..76f70257 --- /dev/null +++ b/src/test/java/org/jenkinsci/plugins/ewm/acceptance/config/ExternalGlobalConfig.java @@ -0,0 +1,33 @@ +package org.jenkinsci.plugins.ewm.acceptance.config; + +import org.jenkinsci.test.acceptance.po.JenkinsConfig; +import org.jenkinsci.test.acceptance.po.PageAreaImpl; + +/** + * Helper class for interacting with External Workspace Manager Plugin global config page. + * + * @author Alexandru Somai + */ +public class ExternalGlobalConfig extends PageAreaImpl { + + public ExternalGlobalConfig(JenkinsConfig context) { + super(context, "/org-jenkinsci-plugins-ewm-steps-ExwsAllocateStep"); + } + + public void addDiskPool(String diskPoolId, String diskOneId, String diskTwoId, + String mountToDiskOne, String mountToDiskTwo) { + // add disk pool + control("repeatable-add").click(); + control("diskPools/diskPoolId").set(diskPoolId); + + // add first disk + control("diskPools/repeatable-add").click(); + control("diskPools/disks/diskId").set(diskOneId); + control("diskPools/disks/masterMountPoint").set(mountToDiskOne); + + // add second disk + control("diskPools/repeatable-add").click(); + control("diskPools/disks[1]/diskId").set(diskTwoId); + control("diskPools/disks[1]/masterMountPoint").set(mountToDiskTwo); + } +} diff --git a/src/test/java/org/jenkinsci/plugins/ewm/acceptance/config/ExternalNodeConfig.java b/src/test/java/org/jenkinsci/plugins/ewm/acceptance/config/ExternalNodeConfig.java new file mode 100644 index 00000000..b56c6bef --- /dev/null +++ b/src/test/java/org/jenkinsci/plugins/ewm/acceptance/config/ExternalNodeConfig.java @@ -0,0 +1,33 @@ +package org.jenkinsci.plugins.ewm.acceptance.config; + +import org.jenkinsci.test.acceptance.po.PageAreaImpl; +import org.jenkinsci.test.acceptance.po.Slave; + +/** + * Helper class for interacting with External Workspace Manager Plugin node config page. + * + * @author Alexandru Somai + */ +public class ExternalNodeConfig extends PageAreaImpl { + + public ExternalNodeConfig(Slave context) { + super(context, "/nodeProperties/org-jenkinsci-plugins-ewm-nodes-ExternalWorkspaceProperty"); + } + + public void setConfig(String diskPoolId, String diskOneId, String diskTwoId, String fakeMountingPoint) { + // set disk pool + control("").click(); + control("repeatable-add").click(); + control("nodeDiskPools/diskPoolRefId").set(diskPoolId); + + // add first disk + control("nodeDiskPools/repeatable-add").click(); + control("nodeDiskPools/nodeDisks/diskRefId").set(diskOneId); + control("nodeDiskPools/nodeDisks/nodeMountPoint").set(fakeMountingPoint); + + // add second disk + control("nodeDiskPools/repeatable-add").click(); + control("nodeDiskPools/nodeDisks[1]/diskRefId").set(diskTwoId); + control("nodeDiskPools/nodeDisks[1]/nodeMountPoint").set(fakeMountingPoint); + } +} From dc584ef2fb39c4b1989fc11c14e392efb408c5ad Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Wed, 30 Oct 2019 19:38:35 +0200 Subject: [PATCH 02/15] [JENKINS-59347] Fix indentation - replace tabs with spaces --- .../ExternalWorkspaceManagerPluginTest.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/test/java/org/jenkinsci/plugins/ewm/acceptance/ExternalWorkspaceManagerPluginTest.java b/src/test/java/org/jenkinsci/plugins/ewm/acceptance/ExternalWorkspaceManagerPluginTest.java index 2d256416..aaca5292 100644 --- a/src/test/java/org/jenkinsci/plugins/ewm/acceptance/ExternalWorkspaceManagerPluginTest.java +++ b/src/test/java/org/jenkinsci/plugins/ewm/acceptance/ExternalWorkspaceManagerPluginTest.java @@ -66,8 +66,8 @@ public void shareWorkspaceOneJobTwoNodes() { "} \n" + "node ('test') { \n" + " exws (extWorkspace) { \n" + - " def content = readFile(file: 'marker') \n" + - " if (content != 'content') error('Content mismatch: ' + content) \n" + + " def content = readFile(file: 'marker') \n" + + " if (content != 'content') error('Content mismatch: ' + content) \n" + " } \n" + "}", DISK_POOL_ID)); @@ -84,7 +84,7 @@ public void shareWorkspaceTwoJobsTwoNodes() { "def extWorkspace = exwsAllocate '%s' \n" + "node ('linux') { \n" + " exws (extWorkspace) { \n" + - " writeFile file: 'marker', text: 'content' \n " + + " writeFile file: 'marker', text: 'content' \n " + " } \n" + "}", DISK_POOL_ID)); @@ -98,8 +98,8 @@ public void shareWorkspaceTwoJobsTwoNodes() { "def extWorkspace = exwsAllocate selectedRun: run \n" + "node ('test') { \n" + " exws (extWorkspace) { \n" + - " def content = readFile(file: 'marker') \n" + - " if (content != 'content') error('Content mismatch: ' + content) \n" + + " def content = readFile(file: 'marker') \n" + + " if (content != 'content') error('Content mismatch: ' + content) \n" + " } \n" + "}", upstreamJob.name)); @@ -114,13 +114,13 @@ public void externalWorkspaceCleanup() { WorkflowJob job = createWorkflowJob(String.format("" + "def extWorkspace = exwsAllocate '%s' \n" + "node ('linux') { \n" + - " exws (extWorkspace) { \n" + - " try { \n" + - " writeFile file: 'foobar.txt', text: 'any' \n" + - " } finally { \n" + - " step ([$class: 'WsCleanup']) \n" + - " } \n" + - " } \n" + + " exws (extWorkspace) { \n" + + " try { \n" + + " writeFile file: 'foobar.txt', text: 'any' \n" + + " } finally { \n" + + " step ([$class: 'WsCleanup']) \n" + + " } \n" + + " } \n" + "}", DISK_POOL_ID)); Build build = job.startBuild(); From 47d3ac1e84b4d9f208c85930677ee7e6f64befae Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Wed, 30 Oct 2019 19:55:38 +0200 Subject: [PATCH 03/15] [JENKINS-59347] Add exclusions to ATH dependency to avoid RequireUpperBoundDeps errors --- pom.xml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/pom.xml b/pom.xml index e0a6a397..ca9d2cbb 100644 --- a/pom.xml +++ b/pom.xml @@ -156,6 +156,44 @@ acceptance-test-harness 1.69 test + + + org.sonatype.sisu + sisu-guice + + + org.jenkins-ci.main + remoting + + + commons-net + commons-net + + + org.jenkins-ci + version-number + + + args4j + args4j + + + commons-httpclient + commons-httpclient + + + com.github.jnr + jnr-ffi + + + com.github.jnr + jnr-constants + + + com.fasterxml.jackson.core + jackson-annotations + + From 1f2776eda79ea96bd334c7aa24c286f181221e80 Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Wed, 30 Oct 2019 20:14:23 +0200 Subject: [PATCH 04/15] [JENKINS-59347] Add maven-surefire-plugin to actually run the ATH tests --- pom.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pom.xml b/pom.xml index ca9d2cbb..87fe8d60 100644 --- a/pom.xml +++ b/pom.xml @@ -206,4 +206,22 @@ + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + ${jenkins.version} + target/external-workspace-manager.hpi + firefox + + + + + + From 3b6c3c59fdcae32054da95706206015a0698f466 Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Wed, 30 Oct 2019 20:33:40 +0200 Subject: [PATCH 05/15] [JENKINS-59347] Add additional exclusions from ATH dependency --- pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pom.xml b/pom.xml index 87fe8d60..5f32e4f5 100644 --- a/pom.xml +++ b/pom.xml @@ -193,6 +193,14 @@ com.fasterxml.jackson.core jackson-annotations + + jdk.tools + jdk.tools + + + org.seleniumhq.selenium + htmlunit-driver + From c1246e450fc89ff1261feed2a044026f09af90f3 Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Wed, 30 Oct 2019 20:58:52 +0200 Subject: [PATCH 06/15] [JENKINS-59347] Add even more exclusions from ATH dependency --- pom.xml | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 5f32e4f5..fc1edfec 100644 --- a/pom.xml +++ b/pom.xml @@ -157,6 +157,22 @@ 1.69 test + + commons-codec + commons-codec + + + commons-net + commons-net + + + commons-httpclient + commons-httpclient + + + org.apache.httpcomponents + httpclient + org.sonatype.sisu sisu-guice @@ -165,10 +181,6 @@ org.jenkins-ci.main remoting - - commons-net - commons-net - org.jenkins-ci version-number @@ -178,8 +190,8 @@ args4j - commons-httpclient - commons-httpclient + com.github.jnr + jnr-unixsocket com.github.jnr @@ -201,6 +213,14 @@ org.seleniumhq.selenium htmlunit-driver + + com.google.inject + guice + + + com.google.guava + guava + From b3d7334cf5233517c550d52a44a8393c8cfc573d Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Wed, 30 Oct 2019 21:03:13 +0200 Subject: [PATCH 07/15] [JENKINS-59347] Exclude slf4j --- pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pom.xml b/pom.xml index fc1edfec..7b560dce 100644 --- a/pom.xml +++ b/pom.xml @@ -221,6 +221,10 @@ com.google.guava guava + + org.slf4j + slf4j-log4j12 + From f5d0c0f932a5f30c54c79cb1485beddb15d12786 Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Wed, 30 Oct 2019 21:27:48 +0200 Subject: [PATCH 08/15] [JENKINS-59347] Revert excluding httpclient --- pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pom.xml b/pom.xml index 7b560dce..22a58c12 100644 --- a/pom.xml +++ b/pom.xml @@ -169,10 +169,6 @@ commons-httpclient commons-httpclient - - org.apache.httpcomponents - httpclient - org.sonatype.sisu sisu-guice From edae257d37ea8e087a8864e15d5cc0f00da2b711 Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Wed, 30 Oct 2019 21:55:53 +0200 Subject: [PATCH 09/15] [JENKINS-59347] Add browsermob-core dependency, needed for ATH --- pom.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pom.xml b/pom.xml index 22a58c12..69273eb3 100644 --- a/pom.xml +++ b/pom.xml @@ -223,6 +223,31 @@ + + + net.lightbody.bmp + browsermob-core + 2.1.5 + test + + + com.fasterxml.jackson.core + jackson-core + + + org.bouncycastle + bcpkix-jdk15on + + + com.jcraft + jzlib + + + org.apache.commons + commons-lang3 + + + From ae121203f0e32a909e25399acb7d2bc360d3a522 Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Wed, 30 Oct 2019 22:10:10 +0200 Subject: [PATCH 10/15] [JENKINS-59347] Exclude Guava because of compatibility issues --- pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pom.xml b/pom.xml index 69273eb3..05eb9cd5 100644 --- a/pom.xml +++ b/pom.xml @@ -246,6 +246,10 @@ org.apache.commons commons-lang3 + + com.google.guava + guava + From d81c27586749c1f41bbad374456e2726bd8d05de Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Thu, 31 Oct 2019 11:30:38 +0200 Subject: [PATCH 11/15] [JENKINS-59347] Try disabling RECORD_BROWSER_TRAFFIC --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d3a34cc5..db421217 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,7 +7,7 @@ stage("UI tests") { sh """ mvn clean package -DskipTests # Build .hpi before running ATH so the snapshot is consumed instead of latest released eval \$(vnc.sh) - mvn test -B -Dmaven.test.failure.ignore=true -DforkCount=1 -Ptest-ath + RECORD_BROWSER_TRAFFIC=off mvn test -B -Dmaven.test.failure.ignore=true -DforkCount=1 -Ptest-ath """ } junit '**/target/surefire-reports/**/*.xml' From ed7d02d96e5037b7cbb48646b7f65e4f0a220ceb Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Thu, 31 Oct 2019 11:32:25 +0200 Subject: [PATCH 12/15] [JENKINS-59347] Move dependencies and build plugins to test-ath profile --- pom.xml | 89 +++++++++++++++++++++++---------------------------------- 1 file changed, 36 insertions(+), 53 deletions(-) diff --git a/pom.xml b/pom.xml index 05eb9cd5..a60b98ab 100644 --- a/pom.xml +++ b/pom.xml @@ -43,8 +43,8 @@ scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git http://github.com/jenkinsci/${project.artifactId}-plugin - HEAD - + HEAD + @@ -209,10 +209,6 @@ org.seleniumhq.selenium htmlunit-driver - - com.google.inject - guice - com.google.guava guava @@ -223,35 +219,6 @@ - - - net.lightbody.bmp - browsermob-core - 2.1.5 - test - - - com.fasterxml.jackson.core - jackson-core - - - org.bouncycastle - bcpkix-jdk15on - - - com.jcraft - jzlib - - - org.apache.commons - commons-lang3 - - - com.google.guava - guava - - - @@ -260,25 +227,41 @@ ExternalWorkspaceManagerPluginTest + + + + + com.google.guava + guava + 25.0-jre + test + + + com.fasterxml.jackson.core + jackson-annotations + 2.8.9 + test + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + ${jenkins.version} + target/external-workspace-manager.hpi + firefox + + + + + - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - ${jenkins.version} - target/external-workspace-manager.hpi - firefox - - - - - - From 626ce978cf33aa2730ccd3a64b051c1d92e86673 Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Thu, 31 Oct 2019 13:04:16 +0200 Subject: [PATCH 13/15] [JENKINS-59347] Change docker image --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index db421217..08ac0e11 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,7 +3,7 @@ buildPlugin() stage("UI tests") { node('docker && highmem') { checkout scm - docker.image('jenkins/ath:acceptance-test-harness-1.65').inside('-v /var/run/docker.sock:/var/run/docker.sock --shm-size 2g') { + docker.image('jenkins/ath:acceptance-test-harness-1.69').inside('-v /var/run/docker.sock:/var/run/docker.sock --shm-size 2g') { sh """ mvn clean package -DskipTests # Build .hpi before running ATH so the snapshot is consumed instead of latest released eval \$(vnc.sh) From 53e7371a5fa6ddd446737dd7e02b1d4e69bcf6c2 Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Thu, 31 Oct 2019 13:05:07 +0200 Subject: [PATCH 14/15] [JENKINS-59347] Enable as default RECORD_BROWSER_TRAFFIC --- Jenkinsfile | 2 +- pom.xml | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 08ac0e11..b844d664 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,7 +7,7 @@ stage("UI tests") { sh """ mvn clean package -DskipTests # Build .hpi before running ATH so the snapshot is consumed instead of latest released eval \$(vnc.sh) - RECORD_BROWSER_TRAFFIC=off mvn test -B -Dmaven.test.failure.ignore=true -DforkCount=1 -Ptest-ath + mvn test -B -Dmaven.test.failure.ignore=true -DforkCount=1 -Ptest-ath """ } junit '**/target/surefire-reports/**/*.xml' diff --git a/pom.xml b/pom.xml index a60b98ab..b321b905 100644 --- a/pom.xml +++ b/pom.xml @@ -236,6 +236,30 @@ 25.0-jre test + + net.lightbody.bmp + browsermob-core + 2.1.5 + test + + + com.fasterxml.jackson.core + jackson-core + + + org.bouncycastle + bcpkix-jdk15on + + + com.jcraft + jzlib + + + org.apache.commons + commons-lang3 + + + com.fasterxml.jackson.core jackson-annotations From ec4c0ebd671d11bff4ec68543be9309ea84b2373 Mon Sep 17 00:00:00 2001 From: Alexandru Somai Date: Fri, 1 Nov 2019 20:31:55 +0200 Subject: [PATCH 15/15] [JENKINS-59347] Exclude httpcore to fix build error --- pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pom.xml b/pom.xml index b321b905..26c55bbe 100644 --- a/pom.xml +++ b/pom.xml @@ -217,6 +217,10 @@ org.slf4j slf4j-log4j12 + + org.apache.httpcomponents + httpcore + @@ -266,6 +270,11 @@ 2.8.9 test + + org.apache.httpcomponents + httpcore + 4.4.12 +