FSchumacher commented on a change in pull request #696:
URL: https://github.com/apache/jmeter/pull/696#discussion_r795168334



##########
File path: 
src/core/src/test/java/org/apache/jmeter/gui/util/JSyntaxTextAreaTest.java
##########
@@ -41,7 +45,37 @@ public void testSetLanguage() {
             textArea.setLanguage(null);
             assertEquals(SyntaxConstants.SYNTAX_STYLE_NONE, 
textArea.getSyntaxEditingStyle());
         } catch (HeadlessException he) {
-            // Does not work in headless mode
+            // Does not work in headless mode, which depends on value of 
java.awt.headless property
+            // and the OS (e.g. might work on MacOS and not on Linux due to 
missing X11).
+            System.out.println("WARNING for 
JSyntaxTextAreaTest.testSetLanguage test: does not work in headless mode");
+        }
+    }
+
+    @Test
+    public void testHeadless() {
+        String key = "java.awt.headless";
+        String initialValue = System.getProperty(key);
+        try {
+            System.setProperty(key, "true");

Review comment:
       For the other tests, we are expecting the test suite to be set up in the 
correct way (for example most of our CI stuff is done in a headless setup). But 
if this works, we can use it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to