Skip to content

Commit 1bafe65

Browse files
authored
Fix Spring Monitor test issue with GraalVM native (Azure#36597)
1 parent 83a99eb commit 1bafe65

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sdk/spring/spring-cloud-azure-starter-monitor-test/src/test/java/com/azure/SpringMonitorTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import io.opentelemetry.sdk.logs.export.LogRecordExporter;
1313
import io.opentelemetry.sdk.metrics.export.MetricExporter;
1414
import io.opentelemetry.sdk.trace.export.SpanExporter;
15+
16+
import java.io.InputStream;
1517
import java.net.MalformedURLException;
1618
import java.net.URL;
1719
import java.util.List;
@@ -105,6 +107,11 @@ public void applicationContextShouldOnlyContainTheAzureMetricExporter() {
105107

106108
@Test
107109
public void shouldMonitor() throws InterruptedException, MalformedURLException {
110+
111+
// Only required with GraalVM native test execution
112+
// we aren't sure why this is needed, seems to be a Logback issue with GraalVM native
113+
SpringMonitorTest.class.getResourceAsStream("/logback.xml");
114+
108115
String response = restTemplate.getForObject(Controller.URL, String.class);
109116
assertThat(response).isEqualTo("OK!");
110117

0 commit comments

Comments
 (0)