Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-54…
Browse files Browse the repository at this point in the history
…86-propertyfileloginmodule
  • Loading branch information
janbartel committed Nov 2, 2020
2 parents dda991c + 8b61d70 commit 9fe3390
Show file tree
Hide file tree
Showing 22 changed files with 353 additions and 421 deletions.
5 changes: 2 additions & 3 deletions Jenkinsfile
Expand Up @@ -128,7 +128,7 @@ def slackNotif() {
*
* @param jdk the jdk tool name (in jenkins) to use for this build
* @param cmdline the command line in "<profiles> <goals> <properties>"`format.
* @return the Jenkinsfile step representing a maven build
* @param consoleParsers array of console parsers to run
*/
def mavenBuild(jdk, cmdline, mvnName, consoleParsers) {
script {
Expand All @@ -138,15 +138,14 @@ def mavenBuild(jdk, cmdline, mvnName, consoleParsers) {
"MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
configFileProvider(
[configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) {
sh "mvn -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Premote-session-tests -Pci -V -B -e -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" +
sh "mvn -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Premote-session-tests -Pci -fae -V -B -e -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" +
env.JENKINS_HOME
}
}
}
finally
{
junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml'
//archiveArtifacts artifacts: '**/jetty-webapp/target/**'
if(consoleParsers!=null){
warnings consoleParsers: consoleParsers
}
Expand Down
2 changes: 1 addition & 1 deletion aggregates/jetty-all/pom.xml
Expand Up @@ -46,7 +46,7 @@
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-build-support</artifactId>
<version>1.3</version>
<version>1.5</version>
</dependency>
</dependencies>
<executions>
Expand Down
Expand Up @@ -65,6 +65,7 @@
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnJre;
import org.junit.jupiter.api.condition.JRE;
Expand Down Expand Up @@ -261,8 +262,8 @@ public void handshakeFailed(Event event, Throwable failure)

// In JDK 11+, a mismatch on the client does not generate any bytes towards
// the server, while in previous JDKs the client sends to the server the close_notify.
@EnabledOnJre({JRE.JAVA_8, JRE.JAVA_9, JRE.JAVA_10})
@Test
// @EnabledOnJre({JRE.JAVA_8, JRE.JAVA_9, JRE.JAVA_10})
@Disabled("No longer viable, TLS protocol behavior changed in 8u272")
public void testMismatchBetweenTLSProtocolAndTLSCiphersOnClient() throws Exception
{
SslContextFactory serverTLSFactory = createServerSslContextFactory();
Expand Down
Expand Up @@ -44,9 +44,8 @@
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnJre;
import org.junit.jupiter.api.condition.JRE;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
Expand All @@ -55,7 +54,7 @@

// This whole test is very specific to how TLS < 1.3 works.
// Starting in Java 11, TLS/1.3 is now enabled by default.
@EnabledOnJre({JRE.JAVA_8, JRE.JAVA_9, JRE.JAVA_10})
@Disabled("Since 8u272 this is no longer valid")
public class SslBytesClientTest extends SslBytesTest
{
private ExecutorService threadPool;
Expand Down
60 changes: 26 additions & 34 deletions jetty-http2/http2-server/pom.xml
Expand Up @@ -15,6 +15,32 @@
<manual.test.port>28888</manual.test.port>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>h2spec-maven-plugin</artifactId>
<configuration>
<mainClass>org.eclipse.jetty.http2.server.H2SpecServer</mainClass>
<skip>${skipTests}</skip>
<junitPackage>org.eclipse.jetty.h2spec</junitPackage>
<skipNoDockerAvailable>true</skipNoDockerAvailable>
<excludeSpecs>
<excludeSpec>3.5 - Sends invalid connection preface</excludeSpec>
</excludeSpecs>
</configuration>
<executions>
<execution>
<id>h2spec</id>
<phase>test</phase>
<goals>
<goal>h2spec</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
Expand Down Expand Up @@ -86,39 +112,5 @@
</plugins>
</build>
</profile>
<profile>
<id>run-h2spec-in-docker</id>
<activation>
<file>
<exists>/var/run/docker.sock</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>h2spec-maven-plugin</artifactId>
<configuration>
<mainClass>org.eclipse.jetty.http2.server.H2SpecServer</mainClass>
<skip>${skipTests}</skip>
<junitPackage>org.eclipse.jetty.h2spec</junitPackage>
<excludeSpecs>
<excludeSpec>3.5 - Sends invalid connection preface</excludeSpec>
</excludeSpecs>
</configuration>
<executions>
<execution>
<id>h2spec</id>
<phase>test</phase>
<goals>
<goal>h2spec</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
142 changes: 0 additions & 142 deletions jetty-io/src/test/java/org/eclipse/jetty/io/SslEngineBehaviorTest.java

This file was deleted.

4 changes: 2 additions & 2 deletions jetty-osgi/test-jetty-osgi/pom.xml
Expand Up @@ -88,13 +88,13 @@
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>3.13.100</version>
<version>3.16.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
<version>3.7.100</version>
<version>3.9.0</version>
<scope>test</scope>
</dependency>

Expand Down
Expand Up @@ -149,7 +149,6 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory, Welc
private boolean _useFileMappedBuffer = false;
private String _relativeResourceBase;
private ServletHandler _servletHandler;
private ServletHolder _defaultHolder;

public DefaultServlet(ResourceService resourceService)
{
Expand Down Expand Up @@ -303,11 +302,6 @@ public void init()
_resourceService.setGzipEquivalentFileExtensions(gzipEquivalentFileExtensions);

_servletHandler = _contextHandler.getChildHandlerByClass(ServletHandler.class);
for (ServletHolder h : _servletHandler.getServlets())
{
if (h.getServletInstance() == this)
_defaultHolder = h;
}

if (LOG.isDebugEnabled())
LOG.debug("resource base = " + _resourceBase);
Expand Down Expand Up @@ -504,19 +498,17 @@ public String getWelcomeFile(String pathInContext)
return null;

String welcomeServlet = null;
for (int i = 0; i < _welcomes.length; i++)
for (String s : _welcomes)
{
String welcomeInContext = URIUtil.addPaths(pathInContext, _welcomes[i]);
String welcomeInContext = URIUtil.addPaths(pathInContext, s);
Resource welcome = getResource(welcomeInContext);
if (welcome != null && welcome.exists())
return welcomeInContext;

if ((_welcomeServlets || _welcomeExactServlets) && welcomeServlet == null)
{
MappedResource<ServletHolder> entry = _servletHandler.getMappedServlet(welcomeInContext);
@SuppressWarnings("ReferenceEquality")
boolean isDefaultHolder = (entry.getResource() != _defaultHolder);
if (entry != null && isDefaultHolder &&
if (entry != null && entry.getResource().getServletInstance() != this &&
(_welcomeServlets || (_welcomeExactServlets && entry.getPathSpec().getDeclaration().equals(welcomeInContext))))
welcomeServlet = welcomeInContext;
}
Expand Down
Expand Up @@ -222,7 +222,8 @@ public void dump(Appendable out, String indent) throws IOException
@Override
public String toString()
{
return String.format("%s@%x==%s,inst=%b,async=%b", getName(), hashCode(), getClassName(), _filter != null, isAsyncSupported());
return String.format("%s==%s@%x{inst=%b,async=%b,src=%s}",
getName(), getClassName(), hashCode(), _filter != null, isAsyncSupported(), getSource());
}

public FilterRegistration.Dynamic getRegistration()
Expand Down
Expand Up @@ -231,6 +231,7 @@ protected void service(HttpServletRequest request, HttpServletResponse response)
if (holder != null)
{
final Request baseRequest = Request.getBaseRequest(request);
holder.prepare(baseRequest, request, response);
holder.handle(baseRequest,
new InvokedRequest(request, included, servlet, servletPath, pathInfo),
response);
Expand Down
Expand Up @@ -126,7 +126,7 @@ public void doStop() throws Exception
@Override
public String toString()
{
return super.toString() + ": " + getClassName();
return String.format("%s@%x{src=%s}", getClassName(), hashCode(), getSource());
}

/**
Expand Down

0 comments on commit 9fe3390

Please sign in to comment.