From 71b0c88607fbcbc6147f573e15713ea9dc90c291 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 28 Jul 2016 14:39:39 -0700 Subject: [PATCH 1/9] Tweaking test stage issues with dependency plugin --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 73e71e8f806..5e60b76b9da 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,7 @@ node { withEnv(mvnEnv) { // Run package then test phase / skip main compilation / ignore failures - sh "mvn -B package test -Dmaven.main.skip=true -Dmaven.test.failure.ignore=true" + sh "mvn -B install test -Dmaven.main.skip=true -Dmaven.test.failure.ignore=true" // Report failures in the jenkins UI step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) } From 995a78053ca54e5b4fe1ab2d8d4f000fb3cc81c7 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 28 Jul 2016 15:02:56 -0700 Subject: [PATCH 2/9] Jenkins experiment with windows and timeouts --- Jenkinsfile | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5e60b76b9da..3bb1e5cf57e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -node { +node('linux') { // System Dependent Locations def mvntool = tool name: 'maven3', type: 'hudson.tasks.Maven$MavenInstallation' def jdktool = tool name: 'jdk7', type: 'hudson.model.JDK' @@ -25,10 +25,36 @@ node { stage 'Test' - withEnv(mvnEnv) { - // Run package then test phase / skip main compilation / ignore failures - sh "mvn -B install test -Dmaven.main.skip=true -Dmaven.test.failure.ignore=true" - // Report failures in the jenkins UI - step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) + timeout(60) { + withEnv(mvnEnv) { + // Run package then test phase / skip main compilation / ignore failures + sh "mvn -B install test -Dmaven.main.skip=true -Dmaven.test.failure.ignore=true" + // Report failures in the jenkins UI + step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) + } + } +} + +node('windows') { + // System Dependent Locations + def mvntool = tool name: 'maven3', type: 'hudson.tasks.Maven$MavenInstallation' + def jdktool = tool name: 'jdk7', type: 'hudson.model.JDK' + + // Environment + List mvnEnv = ["PATH+MVN=${mvntool}/bin", "PATH+JDK=${jdktool}/bin", "JAVA_HOME=${jdktool}/", "MAVEN_HOME=${mvntool}"] + mvnEnv.add("MAVEN_OPTS=-Xms256m -Xmx1024m -XX:MaxPermSize=512m -Djava.awt.headless=true") + + stage 'Checkout (Windows)' + + checkout scm + + stage 'Build + Test (Windows)' + + timeout(60) { + withEnv(mvnEnv) { + bat "mvn -B clean install -Dmaven.test.failure.ignore=true" + // Report failures in the jenkins UI + step([$class: 'JUnitResultArchiver', testResults: '**\\target\\surefire-reports\\TEST-*.xml']) + } } } From 796e596673b1aa527d36fc722db15d8c0ad4e209 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 28 Jul 2016 15:41:36 -0700 Subject: [PATCH 3/9] Removing windows build from pipeline (takes too long) --- Jenkinsfile | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3bb1e5cf57e..a4cd35b66c2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,5 @@ +#!groovy + node('linux') { // System Dependent Locations def mvntool = tool name: 'maven3', type: 'hudson.tasks.Maven$MavenInstallation' @@ -35,26 +37,4 @@ node('linux') { } } -node('windows') { - // System Dependent Locations - def mvntool = tool name: 'maven3', type: 'hudson.tasks.Maven$MavenInstallation' - def jdktool = tool name: 'jdk7', type: 'hudson.model.JDK' - - // Environment - List mvnEnv = ["PATH+MVN=${mvntool}/bin", "PATH+JDK=${jdktool}/bin", "JAVA_HOME=${jdktool}/", "MAVEN_HOME=${mvntool}"] - mvnEnv.add("MAVEN_OPTS=-Xms256m -Xmx1024m -XX:MaxPermSize=512m -Djava.awt.headless=true") - - stage 'Checkout (Windows)' - - checkout scm - - stage 'Build + Test (Windows)' - - timeout(60) { - withEnv(mvnEnv) { - bat "mvn -B clean install -Dmaven.test.failure.ignore=true" - // Report failures in the jenkins UI - step([$class: 'JUnitResultArchiver', testResults: '**\\target\\surefire-reports\\TEST-*.xml']) - } - } -} +// vim: et:ts=2:sw=2:ft=groovy From 225460fea39bc8f4ae2753e9c2509c103b3009d5 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 29 Jul 2016 09:53:54 -0700 Subject: [PATCH 4/9] Bumping up dependency-plugin version --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index e8a77dbe683..26c3f5460e8 100644 --- a/pom.xml +++ b/pom.xml @@ -328,6 +328,7 @@ org.apache.maven.plugins maven-dependency-plugin + 2.10 org.apache.maven.plugins From 28f557b0e17f33e768b141ae75a213037722a3d1 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 29 Jul 2016 12:47:37 -0700 Subject: [PATCH 5/9] Using maven-shade-plugin 2.4.3 now --- jetty-websocket/websocket-client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-websocket/websocket-client/pom.xml b/jetty-websocket/websocket-client/pom.xml index e5cfd766bc5..ddd7a247c7e 100644 --- a/jetty-websocket/websocket-client/pom.xml +++ b/jetty-websocket/websocket-client/pom.xml @@ -88,7 +88,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.0 + 2.4.3 package From db76da0fee37ded352c37744be44140bc855572c Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 29 Jul 2016 12:48:21 -0700 Subject: [PATCH 6/9] Simplifying build & test --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a4cd35b66c2..22e32a63a5d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,8 +29,8 @@ node('linux') { timeout(60) { withEnv(mvnEnv) { - // Run package then test phase / skip main compilation / ignore failures - sh "mvn -B install test -Dmaven.main.skip=true -Dmaven.test.failure.ignore=true" + // Run test phase / ignore test failures + sh "mvn -B test -Dmaven.test.failure.ignore=true" // Report failures in the jenkins UI step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) } From d6dd5046ceebc4866119b5426a898b1999c36999 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 29 Jul 2016 16:09:03 -0700 Subject: [PATCH 7/9] work around jetty-distribution incremental build issue --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 22e32a63a5d..e61f9de6de0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,7 +30,7 @@ node('linux') { timeout(60) { withEnv(mvnEnv) { // Run test phase / ignore test failures - sh "mvn -B test -Dmaven.test.failure.ignore=true" + sh "mvn -B install -Dmaven.test.failure.ignore=true" // Report failures in the jenkins UI step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) } From 5cb50e5f5de301d3d0808af51b9cd4e13212d245 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 4 Aug 2016 14:02:16 +1000 Subject: [PATCH 8/9] ignore PathResource test --- .../java/org/eclipse/jetty/util/resource/PathResourceTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/resource/PathResourceTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/resource/PathResourceTest.java index 38eb27e7255..9cb154170e9 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/resource/PathResourceTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/resource/PathResourceTest.java @@ -22,6 +22,9 @@ import java.io.File; import java.io.IOException; import java.net.URI; +import org.junit.Ignore; + +@Ignore // Ignore as PathResource not utilized in 9.2 and fixed in 9.3 public class PathResourceTest extends AbstractFSResourceTest { @Override From 6f643d69821a671e9d40fe3a35cdb2e876d8c2e6 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Fri, 5 Aug 2016 18:12:24 +1000 Subject: [PATCH 9/9] Issue #817 --- .../eclipse/jetty/plus/jndi/NamingEntry.java | 9 ++++++ .../jetty/plus/jndi/TestNamingEntries.java | 30 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/jetty-plus/src/main/java/org/eclipse/jetty/plus/jndi/NamingEntry.java b/jetty-plus/src/main/java/org/eclipse/jetty/plus/jndi/NamingEntry.java index 16e6397e620..9f2daa10830 100644 --- a/jetty-plus/src/main/java/org/eclipse/jetty/plus/jndi/NamingEntry.java +++ b/jetty-plus/src/main/java/org/eclipse/jetty/plus/jndi/NamingEntry.java @@ -57,9 +57,18 @@ public abstract class NamingEntry } + /** + * Create a naming entry. + * + * @param scope an object representing the scope of the name to be bound into jndi, where null means jvm scope. + * @param jndiName the name that will be associated with an object bound into jndi + * @throws NamingException + */ protected NamingEntry (Object scope, String jndiName) throws NamingException { + if (jndiName == null) + throw new NamingException("jndi name is null"); this._scope=scope; this._jndiName = jndiName; } diff --git a/jetty-plus/src/test/java/org/eclipse/jetty/plus/jndi/TestNamingEntries.java b/jetty-plus/src/test/java/org/eclipse/jetty/plus/jndi/TestNamingEntries.java index ba17f088a96..d2c9da179d6 100644 --- a/jetty-plus/src/test/java/org/eclipse/jetty/plus/jndi/TestNamingEntries.java +++ b/jetty-plus/src/test/java/org/eclipse/jetty/plus/jndi/TestNamingEntries.java @@ -23,6 +23,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.Hashtable; @@ -241,6 +242,35 @@ public class TestNamingEntries testLink(); } + + @Test + public void testNullJndiName () throws Exception + { + try + { + InitialContext icontext = new InitialContext(); + Resource resource = new Resource (null,"foo"); + fail ("Null jndi name should not be permitted"); + } + catch (NamingException e) + { + //expected + } + } + + @Test + public void testNullObject () throws Exception + { + InitialContext icontext = new InitialContext(); + Resource resource = new Resource ("foo/bar", null); + NamingEntry ne = NamingEntryUtil.lookupNamingEntry(null, "foo/bar"); + assertNotNull(ne); + Object o = icontext.lookup("foo/bar"); + assertNull(o); + + } + + @Test public void testLink () throws Exception {