You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2023/04/15 12:01:14 UTC
[groovy] 02/03: Add JDK21 build
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit c6459db64d19e6c12fd074eb1edb32d5c0fa420e
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Apr 15 19:18:49 2023 +0800
Add JDK21 build
(cherry picked from commit 473112fddf7d0c1fcb6962cde22f5cc42630ce7e)
---
.github/workflows/groovy-build-test-ea.yml | 3 ++-
src/test/groovy/execute/ExecuteTest.groovy | 7 +++----
src/test/groovy/transform/stc/LambdaTest.groovy | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/groovy-build-test-ea.yml b/.github/workflows/groovy-build-test-ea.yml
index 1737f636c7..505fedaa0d 100644
--- a/.github/workflows/groovy-build-test-ea.yml
+++ b/.github/workflows/groovy-build-test-ea.yml
@@ -28,7 +28,8 @@ jobs:
os: [ubuntu-20.04]
java: [17]
# The jdk links of "install-jdk.sh" are sometimes outdated, so we have to download openjdk releases from https://jdk.java.net/ by ourselves.
- jdk: ["https://download.java.net/java/GA/jdk20/bdc68b4b9cbc4ebcb30745c85038d91d/36/GPL/openjdk-20_linux-x64_bin.tar.gz"]
+ jdk: ["https://download.java.net/java/GA/jdk20/bdc68b4b9cbc4ebcb30745c85038d91d/36/GPL/openjdk-20_linux-x64_bin.tar.gz",
+ "https://download.java.net/java/early_access/jdk21/18/GPL/openjdk-21-ea+18_linux-x64_bin.tar.gz"]
runs-on: ${{ matrix.os }}
steps:
- name: Download JDK ${{ matrix.jdk }}
diff --git a/src/test/groovy/execute/ExecuteTest.groovy b/src/test/groovy/execute/ExecuteTest.groovy
index f9bc1055f6..6c906a9658 100644
--- a/src/test/groovy/execute/ExecuteTest.groovy
+++ b/src/test/groovy/execute/ExecuteTest.groovy
@@ -19,9 +19,6 @@
package groovy.execute
import groovy.test.GroovyTestCase
-
-import static groovy.test.GroovyAssert.isAtLeastJdk
-
/**
* Cross platform tests for the DGM#execute() family of methods.
*/
@@ -157,7 +154,9 @@ final class ExecuteTest extends GroovyTestCase {
def err = new StringBuffer()
process.waitForProcessOutput(out, err)
- assert out.toString().startsWith('hello')
+ // Run on JDK21ea, we got the following warning:
+ // '[0.054s][warning][cds] Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "groovy.lang.GroovyClassLoader"). To use archived non-system classes, this property must not be set\nhello\n'
+ assert out.toString().contains('hello')
assert process.exitValue() == 0
}
}
diff --git a/src/test/groovy/transform/stc/LambdaTest.groovy b/src/test/groovy/transform/stc/LambdaTest.groovy
index c117fbac24..d3a2375d92 100644
--- a/src/test/groovy/transform/stc/LambdaTest.groovy
+++ b/src/test/groovy/transform/stc/LambdaTest.groovy
@@ -1140,7 +1140,7 @@ final class LambdaTest {
test()
'''
- assert err.message.contains('$Lambda$')
+ assert err.message.contains('$Lambda')
}
@Test
@@ -1756,7 +1756,7 @@ final class LambdaTest {
assertScript shell, '''
static void main(args) {
Function<String, String> lower = String::toLowerCase
- assert lower.toString().contains('$$Lambda$')
+ assert lower.toString().contains('$$Lambda')
}
'''
}