File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,9 @@ jobs:
138138 - name : Compile and test
139139 timeout-minutes : 60
140140 run : |
141+ . .github/workflows/utils.sh
142+ jvm_timezone=$(random_timezone)
143+ echo "JVM timezone is set to $jvm_timezone"
141144 set -o pipefail
142145
143146 case ${{ inputs.module }} in
@@ -205,7 +208,7 @@ jobs:
205208
206209 build_maven_parameter="${build_maven_parameter:+$build_maven_parameter }${{ inputs.custom-maven-parameter }}"
207210
208- mvn --no-snapshot-updates -B -DskipTests -pl $compile_modules -am install && mvn --no-snapshot-updates -B $build_maven_parameter -pl $modules verify
211+ mvn --no-snapshot-updates -B -DskipTests -pl $compile_modules -am install && mvn --no-snapshot-updates -B $build_maven_parameter -pl $modules verify -Duser.timezone=$jvm_timezone
209212
210213 - name : Print JVM thread dumps when cancelled
211214 if : ${{ failure() }}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # ###############################################################################
3+ # Licensed to the Apache Software Foundation (ASF) under one
4+ # or more contributor license agreements. See the NOTICE file
5+ # distributed with this work for additional information
6+ # regarding copyright ownership. The ASF licenses this file
7+ # to you under the Apache License, Version 2.0 (the
8+ # "License"); you may not use this file except in compliance
9+ # with the License. You may obtain a copy of the License at
10+ #
11+ # http://www.apache.org/licenses/LICENSE-2.0
12+ #
13+ # Unless required by applicable law or agreed to in writing, software
14+ # distributed under the License is distributed on an "AS IS" BASIS,
15+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+ # See the License for the specific language governing permissions and
17+ # limitations under the License.
18+ # ###############################################################################
19+
20+ function random_timezone() {
21+ local rnd=$( expr $RANDOM % 25)
22+ local hh=$( expr $rnd / 2)
23+ local mm=$( expr $rnd % 2 \* 3) " 0"
24+ local sgn=$( expr $RANDOM % 2)
25+ if [ $sgn -eq 0 ]
26+ then
27+ echo " GMT+$hh :$mm "
28+ else
29+ echo " GMT-$hh :$mm "
30+ fi
31+ }
You can’t perform that action at this time.
0 commit comments