Skip to content

Commit

Permalink
DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed May 9, 2022
1 parent 68d8c0b commit cce493a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 22 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,12 @@ jobs:
with:
path: agent/agent/build/libs/applicationinsights-agent-*-SNAPSHOT.jar

setup-smoke-test-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v1
with:
java-version: 11
- id: set-matrix
# "grep -v skipWinNative" is used to skip the warning message "Skipping build of :etw:native because skipWinNative=true"
run: echo "::set-output name=matrix::{\"module\":[\"$(./gradlew -q :test:smoke:testApps:listTestApps | grep -v skipWinNative | xargs echo | sed 's/ /","/g')\"]}"

smoke-test:
needs: setup-smoke-test-matrix
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJson(needs.setup-smoke-test-matrix.outputs.matrix)}}
matrix:
module:
- ":test:smoke:testApps:NonDaemonThreads"
fail-fast: false
steps:
- name: Check out repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,19 @@ public void emit(LogData logData) {
}

@Override
@SuppressWarnings("SystemOut")
public CompletableResultCode shutdown() {

System.out.println("LOG FLUSH");

// TODO? de-dupe flushing of TelemetryClient three times for spans, logs and metrics

// see /~https://github.com/open-telemetry/opentelemetry-java/issues/4416
return forceFlush();
}

@Override
@SuppressWarnings("SystemOut")
public CompletableResultCode forceFlush() {
CompletableResultCode overallResult = new CompletableResultCode();
CompletableResultCode delegateResult = delegate.forceFlush();
Expand All @@ -62,12 +66,15 @@ public CompletableResultCode forceFlush() {
telemetryClientResult.whenComplete(
() -> {
if (telemetryClientResult.isSuccess()) {
System.out.println("OVERALL SUCCESS");
overallResult.succeed();
} else {
System.out.println("OVERALL FAIL");
overallResult.fail();
}
});
} else {
System.out.println("OVERALL FAIL");
overallResult.fail();
}
});
Expand Down
3 changes: 0 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ include(":dependencyManagement")
// Projects for smokeTests
include ':test:smoke'
include ':test:smoke:appServers'
include ':test:smoke:appServers:Tomcat.8.5'
include ':test:smoke:appServers:Wildfly.11'
include ':test:smoke:appServers:Jetty.9'
include ':test:smoke:appServers:JavaSE'
include ':test:smoke:testApps'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ public class SpringBootApp {
private static final Logger logger = LoggerFactory.getLogger("smoketestapp");

public static void main(String[] args) throws IOException {
System.out.println("HELLO FROM MAIN");
if (args.length == 1 && args[0].equals("okhttp3")) {
System.out.println("HELLO FROM FORK");
okHttp3();
logger.info("done");
System.out.println("LOGGED!");
return;
}
SpringApplication.run(SpringBootApp.class, args);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
azul/zulu-openjdk:8
azul/zulu-openjdk:11

0 comments on commit cce493a

Please sign in to comment.