File tree 8 files changed +359
-9
lines changed
instrumentation/ratpack/ratpack-1.7/library/src/test/java/io/opentelemetry/instrumentation/ratpack/v1_7
src/main/java/io/opentelemetry/instrumentation/testreport
8 files changed +359
-9
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ for [`dependabot/**/**`](https://github.com/open-telemetry/community/blob/main/d
75
75
- Key is associated with [ @trask ] ( https://github.com/trask ) 's gmail address
76
76
- ` SONATYPE_KEY ` - owned by [ @trask ] ( https://github.com/trask )
77
77
- ` SONATYPE_USER ` - owned by [ @trask ] ( https://github.com/trask )
78
+ - ` FLAKY_TEST_REPORTER_ACCESS_KEY ` - owned by [ @laurit ] ( https://github.com/laurit )
78
79
79
80
### Organization secrets
80
81
Original file line number Diff line number Diff line change @@ -290,6 +290,22 @@ jobs:
290
290
if : ${{ !cancelled() && hashFiles('build-scan.txt') != '' }}
291
291
run : cat build-scan.txt
292
292
293
+ - name : Get current job url
294
+ uses : Tiryoh/gha-jobid-action@be260d8673c9211a84cdcf37794ebd654ba81eef # v1.4.0
295
+ id : jobs
296
+ with :
297
+ job_name : " test${{ matrix.test-partition }} (${{ matrix.test-java-version }}, ${{ matrix.vm }})"
298
+ per_page : 50 # input matrix size here if it is larger than 30
299
+
300
+ - name : Flaky test report
301
+ if : ${{ !cancelled() }}
302
+ env :
303
+ FLAKY_TEST_REPORTER_ACCESS_KEY : ${{ secrets.FLAKY_TEST_REPORTER_ACCESS_KEY }}
304
+ JOB_URL : ${{ steps.jobs.outputs.html_url }}
305
+ run : |
306
+ BUILD_SCAN_URL=$(cat build-scan.txt)
307
+ ./gradlew :test-report:reportFlakyTests
308
+
293
309
- name : Upload deadlock detector artifacts if any
294
310
if : failure()
295
311
uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
Original file line number Diff line number Diff line change @@ -10,19 +10,16 @@ jobs:
10
10
common :
11
11
uses : ./.github/workflows/build-common.yml
12
12
with :
13
- max-test-retries : 0
14
13
no-build-cache : true
15
14
16
15
test-latest-deps :
17
16
uses : ./.github/workflows/reusable-test-latest-deps.yml
18
17
with :
19
- max-test-retries : 0
20
18
no-build-cache : true
21
19
22
20
test-indy :
23
21
uses : ./.github/workflows/reusable-test-indy.yml
24
22
with :
25
- max-test-retries : 0
26
23
no-build-cache : true
27
24
28
25
# muzzle is not included here because it doesn't use gradle cache anyway and so is already covered
Original file line number Diff line number Diff line change 9
9
jobs :
10
10
common :
11
11
uses : ./.github/workflows/build-common.yml
12
- with :
13
- max-test-retries : 0
14
12
15
13
test-latest-deps :
16
14
uses : ./.github/workflows/reusable-test-latest-deps.yml
17
- with :
18
- max-test-retries : 0
19
15
20
16
test-indy :
21
17
uses : ./.github/workflows/reusable-test-indy.yml
22
- with :
23
- max-test-retries : 0
24
18
25
19
muzzle :
26
20
uses : ./.github/workflows/reusable-muzzle.yml
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright The OpenTelemetry Authors
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ package io .opentelemetry .instrumentation .ratpack .v1_7 ;
7
+
8
+ import static org .assertj .core .api .Assertions .assertThat ;
9
+
10
+ import java .util .Random ;
11
+ import org .junit .jupiter .api .Test ;
12
+
13
+ class FlakyTest {
14
+
15
+ @ Test
16
+ void flakyTest1 () {
17
+ assertThat (new Random ().nextInt (10 )).isLessThan (3 );
18
+ }
19
+
20
+ @ Test
21
+ void flakyTest2 () {
22
+ assertThat (new Random ().nextInt (10 )).isLessThan (3 );
23
+ }
24
+
25
+ @ Test
26
+ void flakyTest3 () {
27
+ assertThat (new Random ().nextInt (10 )).isLessThan (3 );
28
+ }
29
+ }
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ include(":instrumentation-annotations-support-testing")
97
97
98
98
// misc
99
99
include(" :dependencyManagement" )
100
+ include(" :test-report" )
100
101
include(" :testing:agent-exporter" )
101
102
include(" :testing:agent-for-testing" )
102
103
include(" :testing:armeria-shaded-for-testing" )
Original file line number Diff line number Diff line change
1
+ plugins {
2
+ id(" otel.java-conventions" )
3
+ }
4
+
5
+ dependencies {
6
+ implementation(" com.google.api-client:google-api-client:2.7.1" )
7
+ implementation(" com.google.apis:google-api-services-sheets:v4-rev20250106-2.0.0" )
8
+ implementation(" com.google.auth:google-auth-library-oauth2-http:1.30.1" )
9
+ }
10
+
11
+ otelJava {
12
+ minJavaVersionSupported.set(JavaVersion .VERSION_17 )
13
+ }
14
+
15
+ tasks {
16
+ val reportFlakyTests by registering(JavaExec ::class ) {
17
+ dependsOn(classes)
18
+
19
+ mainClass.set(" io.opentelemetry.instrumentation.testreport.FlakyTestReporter" )
20
+ classpath(sourceSets[" main" ].runtimeClasspath)
21
+
22
+ systemProperty(" scanPath" , project.rootDir)
23
+ systemProperty(" googleSheetsAccessKey" , System .getenv(" FLAKY_TEST_REPORTER_ACCESS_KEY" ))
24
+ systemProperty(" buildScanUrl" , System .getenv(" BUILD_SCAN_URL" ))
25
+ systemProperty(" jobUrl" , System .getenv(" JOB_URL" ))
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments