diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2022-05-29 17:39:14 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2022-06-08 10:12:08 +0200 |
commit | 734399c105e9314dffb57d764439b87e3960a50f (patch) | |
tree | c720421d1a417a9efe6fafb586557702dd7baca3 /dev-java | |
parent | dev-tex/rubber: mark Python 3.10 compatible (diff) | |
download | gentoo-734399c105e9314dffb57d764439b87e3960a50f.tar.gz gentoo-734399c105e9314dffb57d764439b87e3960a50f.tar.bz2 gentoo-734399c105e9314dffb57d764439b87e3960a50f.zip |
dev-java/logback-core: Ignore test failing under Java 17
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/25676
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/logback-core/files/logback-core-1.2.11-Ignore-test-failing-under-Java-16.patch | 24 | ||||
-rw-r--r-- | dev-java/logback-core/logback-core-1.2.11.ebuild | 13 |
2 files changed, 35 insertions, 2 deletions
diff --git a/dev-java/logback-core/files/logback-core-1.2.11-Ignore-test-failing-under-Java-16.patch b/dev-java/logback-core/files/logback-core-1.2.11-Ignore-test-failing-under-Java-16.patch new file mode 100644 index 000000000000..9423f26e9a1a --- /dev/null +++ b/dev-java/logback-core/files/logback-core-1.2.11-Ignore-test-failing-under-Java-16.patch @@ -0,0 +1,24 @@ +--- a/src/test/java/ch/qos/logback/core/AsyncAppenderBaseTest.java ++++ b/src/test/java/ch/qos/logback/core/AsyncAppenderBaseTest.java +@@ -18,6 +18,7 @@ + import static org.junit.Assert.assertTrue; + + import org.junit.Before; ++import org.junit.Ignore; + import org.junit.Test; + + import ch.qos.logback.core.helpers.NOPAppender; +@@ -281,10 +282,13 @@ public void verifyInterruptionFlagWhenStopping_NOT_INTERUPPTED() { + } + + ++ // In JDK non started threads can be interrupted ++ @Ignore + @Test + public void verifyInterruptionOfWorkerIsSwallowed() { + asyncAppenderBase.addAppender(delayingListAppender); + asyncAppenderBase.start(); ++ Thread.yield(); + asyncAppenderBase.stop(); + assertFalse(asyncAppenderBase.worker.isInterrupted()); + } diff --git a/dev-java/logback-core/logback-core-1.2.11.ebuild b/dev-java/logback-core/logback-core-1.2.11.ebuild index 0cdfe7da5744..82c0939dbb61 100644 --- a/dev-java/logback-core/logback-core-1.2.11.ebuild +++ b/dev-java/logback-core/logback-core-1.2.11.ebuild @@ -70,6 +70,13 @@ src_prepare() { sed \ -e 's:org.mockito.Matchers:org.mockito.ArgumentMatchers:' \ -i 'src/test/java/ch/qos/logback/core/net/AbstractSocketAppenderIntegrationTest.java' || die + + # Ignore test failing under Java 16 + # See https://github.com/qos-ch/logback/commit/d6a8200cea6d960bf6832b9b95aed64e87474afb + local vm_version="$(java-config -g PROVIDES_VERSION)" + if [[ "${vm_version}" -ge "17" ]] ; then + eapply "${FILESDIR}/logback-core-1.2.11-Ignore-test-failing-under-Java-16.patch" + fi } src_test() { @@ -84,10 +91,11 @@ src_test() { pushd src/test/java || die local JAVA_TEST_RUN_ONLY=$(find * \ -name "*Test.java" \ - ! -name "**/All*Test.java" \ - ! -name "**/PackageTest.java" \ + ! -wholename "**/All*Test.java" \ + ! -wholename "**/PackageTest.java" \ ! -name "AbstractAppenderTest.java" \ ! -name "AbstractPatternLayoutBaseTest.java" \ + ! -name "AbstractSocketAppenderIntegrationTest.java" \ ) JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}" JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}" @@ -97,6 +105,7 @@ src_test() { local vm_version="$(java-config -g PROVIDES_VERSION)" if [[ "${vm_version}" -ge "17" ]] ; then JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.lang=ALL-UNNAMED ) + JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.io=ALL-UNNAMED ) fi java-pkg-simple_src_test } |