Skip to content

Commit 596f0f6

Browse files
committed
debug flaky test reporter
1 parent 80d222e commit 596f0f6

File tree

2 files changed

+20
-0
lines changed
  • instrumentation/ratpack/ratpack-1.7/library/src/test/java/io/opentelemetry/instrumentation/ratpack/v1_7
  • test-report/src/main/java/io/opentelemetry/instrumentation/testreport

2 files changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
public class FlakyTest {
14+
15+
@Test
16+
void flakyTest() {
17+
assertThat(new Random().nextInt(10)).isLessThan(3);
18+
}
19+
}

test-report/src/main/java/io/opentelemetry/instrumentation/testreport/FlakyTestReporter.java

+1
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ public static void main(String... args) throws Exception {
283283
String buildScanUrl = System.getProperty("buildScanUrl");
284284
String jobUrl = System.getProperty("jobUrl");
285285
if (accessKey != null && !accessKey.isEmpty()) {
286+
System.err.println("access key is set");
286287
reporter.report(accessKey, buildScanUrl, jobUrl);
287288
}
288289
}

0 commit comments

Comments
 (0)