Skip to content

Commit

Permalink
Pass jvm arguments from env var on windows payara (#2874)
Browse files Browse the repository at this point in the history
* Pass jvm arguments from env var on windows payara

* enable more debug logging

* capture test output

* use the same fake backend as regular smoke test
  • Loading branch information
laurit authored Apr 27, 2021
1 parent b1b5b14 commit 2df0bb4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions examples/distro/smoke-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ dependencies {
tasks.test {
useJUnitPlatform()

testLogging.showStandardStreams = true

def shadowTask = project(":agent").tasks.shadowJar
inputs.files(layout.files(shadowTask))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected Map<String, String> getExtraEnv() {
static void setupSpec() {
backend =
new GenericContainer<>(
"open-telemetry-docker-dev.bintray.io/java/smoke-fake-backend:latest")
"ghcr.io/open-telemetry/java-test-containers:smoke-fake-backend-20210324.684269693")
.withExposedPorts(8080)
.waitingFor(Wait.forHttp("/health").forPort(8080))
.withNetwork(network)
Expand Down Expand Up @@ -172,7 +172,7 @@ private String waitForContent() throws IOException, InterruptedException {

Request request =
new Request.Builder()
.url(String.format("http://localhost:%d/get-requests", backend.getMappedPort(8080)))
.url(String.format("http://localhost:%d/get-traces", backend.getMappedPort(8080)))
.build();

try (ResponseBody body = client.newCall(request).execute().body()) {
Expand Down
5 changes: 5 additions & 0 deletions examples/distro/smoke-tests/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@

<logger name="io.opentelemetry" level="debug"/>
<logger name="com.example.javaagent" level="debug"/>
<logger name="org.testcontainers" level="debug"/>
<logger name="org.testcontainers.shaded" level="warn"/>
<logger name="org.testcontainers.containers.output.WaitingConsumer" level="warn"/>
<logger name="Collector" level="debug"/>
<logger name="Backend" level="debug"/>

</configuration>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM winamd64/openjdk:11.0.10-jdk-windowsservercore-1809
FROM winamd64/openjdk:11.0.11-jdk-windowsservercore-1809
COPY fake-backend.jar /fake-backend.jar
CMD ["java", "-jar", "/fake-backend.jar"]
3 changes: 1 addition & 2 deletions smoke-tests/matrix/src/main/docker/payara/launch.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
java -jar glassfish/lib/client/appserver-cli.jar start-domain domain1
powershell -command "Get-Content /server/glassfish/domains/domain1/logs/server.log -Wait"
java %JVM_ARGS% -jar glassfish/lib/client/appserver-cli.jar start-domain --verbose domain1

0 comments on commit 2df0bb4

Please sign in to comment.