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

Fix running timezone-sensitive tests in IntelliJ IDEA #358

Merged
merged 1 commit into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Airbase 140

* Pass `user.timezone` in tests as a system property, not as a JVM argument
- It restores the ability to run some timezone-sensitive tests
from within IntelliJ IDEA

Airbase 139

* Replace checkstyle illegal imports with `RestrictImports` enforcer rules
Expand Down
5 changes: 2 additions & 3 deletions airbase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@
<configuration>
<systemPropertyVariables>
<sun.jnu.encoding>${project.build.sourceEncoding}</sun.jnu.encoding>
<user.timezone>${air.test.timezone}</user.timezone>
<java.awt.headless>true</java.awt.headless>
<java.util.logging.SimpleFormatter.format>%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tS.%1$tL%1$tz %4$s %5$s%6$s%n</java.util.logging.SimpleFormatter.format>
</systemPropertyVariables>
Expand All @@ -510,9 +511,7 @@
<argLine>
@{argLine}

<!-- Pass the following three directly to the JVM,
because systemPropertyVariables are not passed correctly by Maven -->
-Duser.timezone=${air.test.timezone}
<!-- Pass the following properties directly to the JVM, because they are not passed correctly by Surefire: -->
-Duser.language=${air.test.language}
-Duser.region=${air.test.region}

Expand Down