Skip to content

Commit

Permalink
verify no JDK 23
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jan 13, 2025
1 parent 218c826 commit 146030e
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 6 deletions.
19 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ SOFTWARE.
<properties>
<timestamp>${maven.build.timestamp}</timestamp>
<jdk.version>1.8</jdk.version>
<maven.compiler.proc>full</maven.compiler.proc>
<argLine/>
</properties>
<dependencies>
Expand Down Expand Up @@ -372,6 +373,24 @@ SOFTWARE.
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-jdk-version</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>[11,23)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion src/it/file-manager/src/verifier/verifications.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SOFTWARE.
<files>
<file>
<location>LICENSE.txt</location>
<contains>2014-2024</contains>
<contains>2014-2025</contains>
</file>
</files>
</verifications>
2 changes: 1 addition & 1 deletion src/test/java/org/takes/facets/fork/FkHitRefreshTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void refreshesOnDemand(@TempDir final Path temp) throws Exception {
() -> done.set(true),
new TkEmpty()
);
TimeUnit.SECONDS.sleep(2L);
TimeUnit.MILLISECONDS.sleep(10L);
FileUtils.touch(temp.resolve("hey.txt").toFile());
MatcherAssert.assertThat(
fork.route(req).has(),
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/takes/http/BkTimeableTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void stopsLongRunningBack(@TempDir final File temp) throws Exception {
final Take take = req -> {
Response rsp;
try {
TimeUnit.SECONDS.sleep(10L);
TimeUnit.SECONDS.sleep(10_000L);
rsp = new RsText("finish");
} catch (final InterruptedException ex) {
Thread.currentThread().interrupt();
Expand Down
25 changes: 25 additions & 0 deletions src/test/resources/junit-platform.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# The MIT License (MIT)
#
# Copyright (c) 2014-2025 Yegor Bugayenko
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

junit.jupiter.execution.timeout.test.method.default = 10s
6 changes: 4 additions & 2 deletions src/test/resources/log4j.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=com.jcabi.log.MulticolorLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[%color{%p}] %t %c: %m%n

log4j.logger.org.takes=DEBUG
log4j.logger.com.jcabi.http=INFO
log4j.logger.org.takes=WARN
log4j.logger.com.jcabi.http=WARN
log4j.logger.org.apache.velocity=WARN
log4j.logger.org.takes.facets.fallback.FbLog4j=ERROR
35 changes: 35 additions & 0 deletions src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License (MIT)
Copyright (c) 2014-2025 Yegor Bugayenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%highlight(%-5level) %logger{15} - %msg%n</pattern>
</encoder>
</appender>
<root level="WARN">
<appender-ref ref="STDOUT"/>
</root>
<logger name="org.takes" level="WARN"/>
</configuration>
2 changes: 1 addition & 1 deletion src/verifier/verifications.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SOFTWARE.
<files>
<file>
<location>LICENSE.txt</location>
<contains>2014-2024</contains>
<contains>2014-2025</contains>
</file>
</files>
</verifications>

0 comments on commit 146030e

Please sign in to comment.