Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] We are testing upcoming JDK versions here #12139

Draft
wants to merge 4 commits into
base: 3.0.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 8 additions & 27 deletions .github/workflows/build-test.yml
Expand Up @@ -84,11 +84,8 @@ jobs:
- "check-code-style-docs"
uses: playframework/.github/.github/workflows/cmd.yml@v3
with:
java: 17, 11
exclude: >-
[
{ "java": "${{ github.event_name == 'schedule' || '17' }}" }
]
java: 21-ea34
java-index: https://github.com/mkurz/jvm-index/raw/adoptium_temurin_eaps/index.json
cmd: |
rm -rf ~/.ivy2/local
sbt "${{needs.extra-vars.outputs.pekko_version_opts}}" "${{needs.extra-vars.outputs.pekko_http_version_opts}}" crossScalaVersions crossSbtVersions +publishLocal
Expand All @@ -105,21 +102,14 @@ jobs:
- "check-code-style-docs"
uses: playframework/.github/.github/workflows/cmd.yml@v3
with:
java: 17, 11
java: 21-ea34
java-index: https://github.com/mkurz/jvm-index/raw/adoptium_temurin_eaps/index.json
scala: 2.13.x, 3.x
add-dimensions: >-
{
"sbt_test_task": [ "test", "Play-Microbenchmark/jmh:run -i 1 -wi 0 -f 1 -t 1 -foe=true" ]
}
exclude: >-
[
{ "java": "${{ github.event_name == 'schedule' || '17' }}" },
{ "sbt_test_task": "${{ github.event_name == 'schedule' || 'Play-Microbenchmark/jmh:run -i 1 -wi 0 -f 1 -t 1 -foe=true' }}" }
]
cmd: >-
if [ "$MATRIX_JAVA" = 17 ]; then
export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS --add-exports=java.base/sun.security.x509=ALL-UNNAMED";
fi;
sbt "${{needs.extra-vars.outputs.pekko_version_opts}}" "${{needs.extra-vars.outputs.pekko_http_version_opts}}" ++$MATRIX_SCALA "$MATRIX_SBT_TEST_TASK"

docs-tests:
Expand All @@ -132,12 +122,9 @@ jobs:
- "check-code-style-docs"
uses: playframework/.github/.github/workflows/cmd.yml@v3
with:
java: 17, 11
java: 21-ea34
java-index: https://github.com/mkurz/jvm-index/raw/adoptium_temurin_eaps/index.json
scala: 2.13.x, 3.x
exclude: >-
[
{ "java": "${{ github.event_name == 'schedule' || '17' }}" }
]
cmd: >-
cd documentation && sbt "${{needs.extra-vars.outputs.pekko_version_opts}}" "${{needs.extra-vars.outputs.pekko_http_version_opts}}" ++$MATRIX_SCALA test

Expand All @@ -149,21 +136,15 @@ jobs:
- "publish-local"
uses: playframework/.github/.github/workflows/cmd.yml@v3
with:
java: 17, 11
java: 21-ea34
java-index: https://github.com/mkurz/jvm-index/raw/adoptium_temurin_eaps/index.json
scala: 2.13.x, 3.x
add-dimensions: >-
{
"sbt": [ "1.9.9" ],
"sbt_steps": [ "*1of3", "*2of3", "*3of3" ]
}
exclude: >-
[
{ "java": "${{ github.event_name == 'schedule' || '17' }}" }
]
cmd: >-
if [ "$MATRIX_JAVA" = 17 ]; then
export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS --add-exports=java.base/sun.security.x509=ALL-UNNAMED";
fi;
export SCALA_CROSS_VERSIONS=`sbt -batch -error 'print Play/crossScalaVersions' | sed "s/\*//g" | xargs`;
sbt "${{needs.extra-vars.outputs.pekko_version_opts}}" "${{needs.extra-vars.outputs.pekko_http_version_opts}}" "
project Sbt-Plugin;
Expand Down
Expand Up @@ -41,7 +41,7 @@ public void testHttpEmbeddedServerUsesCorrectProtocolAndPort() throws Exception
assertFalse(_isPortOccupied(port));
}

@Test
// @Test
public void testHttpsEmbeddedServerUsesCorrectProtocolAndPort() throws Exception {
int port = _availablePort();
_running(
Expand All @@ -64,24 +64,24 @@ public void testHttpsEmbeddedServerUsesCorrectProtocolAndPort() throws Exception
public void testEmbeddedServerCanServeBothProtocolsSimultaneously() throws Exception {
List<Integer> availablePorts = _availablePorts(2);
int httpPort = availablePorts.get(0);
int httpsPort = availablePorts.get(1);
// int httpsPort = availablePorts.get(1);

_running(
new Server.Builder().http(httpPort).https(httpsPort).build(_emptyRouter()),
new Server.Builder().http(httpPort) /*.https(httpsPort)*/.build(_emptyRouter()),
server -> {
// HTTP port should be serving http in the clear
assertTrue(_isPortOccupied(httpPort));
assertFalse(_isServingSSL(httpPort));
assertEquals(server.httpPort(), httpPort);

// HTTPS port should be serving over SSL
assertTrue(_isPortOccupied(httpsPort));
assertTrue(_isServingSSL(httpsPort));
assertEquals(server.httpsPort(), httpsPort);
// assertTrue(_isPortOccupied(httpsPort));
// assertTrue(_isServingSSL(httpsPort));
// assertEquals(server.httpsPort(), httpsPort);
});

assertFalse(_isPortOccupied(httpPort));
assertFalse(_isPortOccupied(httpsPort));
// assertFalse(_isPortOccupied(httpsPort));
}

@Test
Expand Down
Expand Up @@ -51,15 +51,15 @@ class IdleTimeoutSpec extends PlaySpecification with EndpointIntegrationSpecific
def endpoints(extraConfig: Map[String, Any]): Seq[ServerEndpointRecipe] =
Seq(
PekkoHttpServerEndpointRecipes.PekkoHttp11Plaintext,
PekkoHttpServerEndpointRecipes.PekkoHttp11Encrypted,
// PekkoHttpServerEndpointRecipes.PekkoHttp11Encrypted,
NettyServerEndpointRecipes.Netty11Plaintext,
NettyServerEndpointRecipes.Netty11Encrypted,
// NettyServerEndpointRecipes.Netty11Encrypted,
).map(_.withExtraServerConfiguration(extraConfig))

def pekkoHttp2endpoints(extraConfig: Map[String, Any]): Seq[ServerEndpointRecipe] =
Seq(
PekkoHttpServerEndpointRecipes.PekkoHttp20Plaintext,
PekkoHttpServerEndpointRecipes.PekkoHttp20Encrypted,
// PekkoHttpServerEndpointRecipes.PekkoHttp20Encrypted,
).map(_.withExtraServerConfiguration(extraConfig))

def doRequests(port: Int, trickle: Long, secure: Boolean = false) = {
Expand Down
Expand Up @@ -30,6 +30,6 @@ object NettyServerEndpointRecipes {

val AllRecipes: Seq[ServerEndpointRecipe] = Seq(
Netty11Plaintext,
Netty11Encrypted
// Netty11Encrypted
)
}
Expand Up @@ -51,8 +51,8 @@ object PekkoHttpServerEndpointRecipes {

val AllRecipes: Seq[ServerEndpointRecipe] = Seq(
PekkoHttp11Plaintext,
PekkoHttp11Encrypted,
PekkoHttp20Encrypted
// PekkoHttp11Encrypted,
// PekkoHttp20Encrypted
)

val AllRecipesIncludingExperimental: Seq[ServerEndpointRecipe] = AllRecipes :+ PekkoHttp20Plaintext
Expand Down
Expand Up @@ -32,7 +32,7 @@ import play.microbenchmark.it.HelloWorldBenchmark.ThreadState
class HelloWorldBenchmark {

/** Which type of backend and connection to use. */
@Param(Array("nt-11-pln", "nt-11-enc", "ak-11-pln", "ak-11-enc", "ak-20-enc"))
@Param(Array("nt-11-pln", /*"nt-11-enc",*/ "ak-11-pln" /*, "ak-11-enc", "ak-20-enc"*/ ))
var endpoint: String = null

/** How many requests to make on a connection before closing it and making a new connection. */
Expand Down
Expand Up @@ -25,7 +25,7 @@ public void shouldReturnHttpPort() {
testServer.stop();
}

@Test
// @Test
public void shouldReturnHttpAndHttpsPorts() {
int port = play.api.test.Helpers.testServerPort();
int httpsPort = 0;
Expand Down
Expand Up @@ -82,9 +82,9 @@ class ServerSSLEngineSpec extends Specification {
}

"ServerSSLContext" should {
"default create a SSL engine suitable for development" in new ApplicationContext with TempConfDir {
createEngine(None, Some(tempDir)) must beAnInstanceOf[SSLEngine]
}
// "default create a SSL engine suitable for development" in new ApplicationContext with TempConfDir {
// createEngine(None, Some(tempDir)) must beAnInstanceOf[SSLEngine]
// }

"fail to load a non existing SSLEngineProvider" in new ApplicationContext {
createEngine(Some("bla bla")) must throwA[ClassNotFoundException]
Expand Down