Skip to content

Commit

Permalink
fix(test): fix flaky test using a date changing depending on timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasdelvat committed Mar 9, 2025
1 parent ffbc988 commit 6c1cf03
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master
- dev
tags:
- '*'
- "*"

pull_request:
branches:
Expand All @@ -19,6 +19,7 @@ jobs:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TZ: "UTC"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -57,7 +58,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
distribution: "temurin"
java-version: 17

# Gradle check
Expand All @@ -71,7 +72,7 @@ jobs:
uses: mikepenz/action-junit-report@v5
if: success() || failure()
with:
report_paths: '**/build/test-results/**/TEST-*.xml'
report_paths: "**/build/test-results/**/TEST-*.xml"

# Shadow Jar, Tar and Zip
- name: Build jars and distribution archives
Expand Down Expand Up @@ -101,7 +102,7 @@ jobs:
env:
REPO: ${{ github.repository }}
with:
package-dir: 'client/package.json'
package-dir: "client/package.json"

# GitHub Release
- name: Create GitHub release
Expand Down Expand Up @@ -172,8 +173,8 @@ jobs:
with:
status: ${{ job.status }}
username: Github Actions
icon_emoji: ':github-actions:'
channel: 'C03H9CEBGS2'
icon_emoji: ":github-actions:"
channel: "C03H9CEBGS2"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ confluentVersion=7.4.4
kafkaVersion=3.6.2
kafkaScalaVersion=2.13
lombokVersion=1.18.32
jacksonVersion=2.17.1
jacksonVersion=2.17.1
org.gradle.jvmargs=-Duser.timezone=UTC
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void membersApi() {
@Test
void offsetsStartApi() {
List<RecordRepository.TimeOffset> result = this.retrieveList(
HttpRequest.GET(GROUP_URL + "/offsets/start?timestamp=2020-03-28T11:40:10.123Z"),
HttpRequest.GET(GROUP_URL + "/offsets/start?timestamp=2020-03-28T09:40:10.123Z"),
RecordRepository.TimeOffset.class
);

Expand Down

0 comments on commit 6c1cf03

Please sign in to comment.