1
# Licensed to the Apache Software Foundation (ASF) under one or more
2
# contributor license agreements. See the NOTICE file distributed with
3
# this work for additional information regarding copyright ownership.
4
# The ASF licenses this file to You under the Apache License, Version 2.0
5
# (the "License"); you may not use this file except in compliance with
6
# the License. You may obtain a copy of the License at
8
# http://www.apache.org/licenses/LICENSE-2.0
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
21
description: 'Gradle sub-module which contains the test being de-flaked. Should be like :core'
25
description: 'Test class to de-flake (must be a ClusterTest). Should be like *SomeTest*'
29
description: 'Number of times to invoke the test'
34
description: 'Java version to use.'
41
runs-on: ubuntu-latest
42
name: Deflake JUnit tests
45
uses: actions/checkout@v4
47
persist-credentials: false
49
uses: ./.github/actions/setup-gradle
51
java-version: ${{ inputs.java-version }}
52
gradle-cache-read-only: true
53
develocity-access-key: ${{ secrets.GE_ACCESS_TOKEN }}
58
TEST_REPEAT: ${{ inputs.test-repeat }}
59
TEST_MODULE: ${{ inputs.test-module }}
60
TEST_PATTERN: ${{ inputs.test-pattern }}
63
./gradlew --info --build-cache --scan --continue \
64
-PtestLoggingEvents=started,passed,skipped,failed \
65
-PignoreFailures=true -PmaxParallelForks=2 \
66
-Pkafka.cluster.test.repeat=$TEST_REPEAT \
67
-PmaxTestRetries=$TEST_REPEAT -PmaxTestRetryFailures=0 \
68
-PmaxQuarantineTestRetries=$TEST_REPEAT -PmaxQuarantineTestRetryFailures=0 \
69
${TEST_MODULE}:test ${TEST_MODULE}:quarantinedTest --tests $TEST_PATTERN
71
echo "exitcode=$exitcode" >> $GITHUB_OUTPUT
72
- name: Archive JUnit reports
73
uses: actions/upload-artifact@v4
74
id: junit-upload-artifact
76
name: junit-reports-${{ inputs.java-version }}
78
**/build/reports/tests/test/*
79
if-no-files-found: ignore
80
- name: Parse JUnit tests
81
run: python .github/scripts/junit.py >> $GITHUB_STEP_SUMMARY
83
GITHUB_WORKSPACE: ${{ github.workspace }}
84
REPORT_URL: ${{ steps.junit-upload-artifact.outputs.artifact-url }}
85
GRADLE_EXIT_CODE: ${{ steps.junit-test.outputs.exitcode }}