Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.

This commit is contained in:
Simone Bordet 2019-09-17 11:18:51 +02:00
commit bee079c021
6 changed files with 44 additions and 4 deletions

View File

@ -0,0 +1,4 @@
DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[jpms]
add-modules: java.sql

View File

@ -10,6 +10,7 @@ session
session-store
[depend]
jdbc
sessions
sessions/jdbc/${db-connection-type}
@ -54,7 +55,3 @@ db-connection-type=datasource
#jetty.session.jdbc.schema.maxIntervalColumn=maxInterval
#jetty.session.jdbc.schema.mapColumn=map
#jetty.session.jdbc.schema.table=JettySessions

View File

@ -3,5 +3,8 @@ DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-m
[description]
JDBC Datasource connections for session storage
[depends]
jdbc
[xml]
etc/sessions/jdbc/datasource.xml

View File

@ -3,5 +3,8 @@ DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-m
[description]
JDBC Driver connections for session storage
[depend]
jdbc
[xml]
etc/sessions/jdbc/driver.xml

View File

@ -24,6 +24,8 @@ import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.http.HttpStatus;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
@ -142,4 +144,33 @@ public class DemoBaseTests extends AbstractDistributionTest
assertThat(response.getContentAsString(), not(containsString("<span class=\"fail\">FAIL</span>")));
}
}
@Test
@DisabledOnJre(JRE.JAVA_8)
public void testJPMS() throws Exception
{
String jettyVersion = System.getProperty("jettyVersion");
DistributionTester distribution = DistributionTester.Builder.newInstance()
.jettyVersion(jettyVersion)
.jettyBase(Paths.get("demo-base"))
.mavenLocalRepository(System.getProperty("mavenRepoPath"))
.build();
int httpPort = distribution.freePort();
int httpsPort = distribution.freePort();
String[] args = {
"--jpms",
"jetty.http.port=" + httpPort,
"jetty.httpConfig.port=" + httpsPort,
"jetty.ssl.port=" + httpsPort
};
try (DistributionTester.Run run = distribution.start(args))
{
assertTrue(run.awaitConsoleLogsFor("Started @", 10, TimeUnit.SECONDS));
startHttpClient();
ContentResponse response = client.GET("http://localhost:" + httpPort + "/test/hello");
assertEquals(HttpStatus.OK_200, response.getStatus());
}
}
}

View File

@ -28,3 +28,5 @@ org.eclipse.jetty.websocket.jsr356=false
# Create and configure the test realm
jetty.demo.realm=etc/realm.properties
# JDBC needed by test-jndi and test-spec
--module=jdbc