File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
dd-java-agent/agent-profiling/profiling-controller/src/test/java/com/datadog/profiling/controller Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 11package com .datadog .profiling .controller ;
22
3+ import static org .junit .jupiter .api .Assertions .assertEquals ;
34import static org .junit .jupiter .api .Assertions .assertThrows ;
45import static org .junit .jupiter .api .condition .JRE .JAVA_8 ;
56
@@ -19,10 +20,18 @@ public class ControllerFactoryTest {
1920 @ Test
2021 @ EnabledOnJre ({JAVA_8 })
2122 public void testCreateControllerJava8 () {
22- assertThrows (
23- UnsupportedEnvironmentException .class ,
24- () -> {
25- ControllerFactory .createController (config );
26- });
23+ System .out .println ("Java Version: " + System .getProperty ("java.version" ) + " " + System .getProperty ("java.vendor" ));
24+ UnsupportedEnvironmentException unsupportedEnvironmentException = assertThrows (
25+ UnsupportedEnvironmentException .class ,
26+ () -> {
27+ ControllerFactory .createController (config );
28+ });
29+ System .out .println (unsupportedEnvironmentException .getMessage ());
30+ System .out .println (System .getProperty ("java.vendor" ));
31+ String expected = "The JFR controller could not find a supported JFR API, use OpenJDK 11+ or Azul zulu version 1.8.0_212+" ;
32+ if ("Azul Systems, Inc." .equals (System .getProperty ("java.vendor" ))) {
33+ expected = "The JFR controller could not find a supported JFR API, use Azul zulu version 1.8.0_212+" ;
34+ }
35+ assertEquals (expected , unsupportedEnvironmentException .getMessage ());
2736 }
2837}
You can’t perform that action at this time.
0 commit comments