jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1854285 - in /jmeter/trunk/test/src/org/apache/jmeter: extractor/json/render/RenderAsJsonRendererSpec.groovy junit/spock/JMeterSpec.groovy
Date Sun, 24 Feb 2019 21:49:09 GMT
Author: pmouawad
Date: Sun Feb 24 21:49:09 2019
New Revision: 1854285

URL: http://svn.apache.org/viewvc?rev=1854285&view=rev
Log:
Fix tests failure due to headless

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/extractor/json/render/RenderAsJsonRendererSpec.groovy
    jmeter/trunk/test/src/org/apache/jmeter/junit/spock/JMeterSpec.groovy

Modified: jmeter/trunk/test/src/org/apache/jmeter/extractor/json/render/RenderAsJsonRendererSpec.groovy
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/extractor/json/render/RenderAsJsonRendererSpec.groovy?rev=1854285&r1=1854284&r2=1854285&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/extractor/json/render/RenderAsJsonRendererSpec.groovy
(original)
+++ jmeter/trunk/test/src/org/apache/jmeter/extractor/json/render/RenderAsJsonRendererSpec.groovy
Sun Feb 24 21:49:09 2019
@@ -24,8 +24,8 @@ import org.apache.jmeter.util.JMeterUtil
 import javax.swing.JTabbedPane
 import org.apache.jmeter.junit.categories.NeedGuiTests
 import org.junit.experimental.categories.Category
+import spock.lang.IgnoreIf
 
-@Category(NeedGuiTests.class)
 class RenderAsJsonRendererSpec extends JMeterSpec {
     def sut = new RenderAsJsonRenderer()
 
@@ -37,6 +37,7 @@ class RenderAsJsonRendererSpec extends J
             sut.jsonWithJSonPathPanel != null;
     }
     
+    @IgnoreIf({ JMeterSpec.isHeadless() })
     def "render image"() {
         given:
             sut.init()
@@ -57,6 +58,7 @@ class RenderAsJsonRendererSpec extends J
             sut.jsonDataField.getText() == ""
     }
     
+    @IgnoreIf({ JMeterSpec.isHeadless() })
     def "render '#input' as JSON Response to '#output'"() {
         given:
             sut.init();

Modified: jmeter/trunk/test/src/org/apache/jmeter/junit/spock/JMeterSpec.groovy
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/junit/spock/JMeterSpec.groovy?rev=1854285&r1=1854284&r2=1854285&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/junit/spock/JMeterSpec.groovy (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/junit/spock/JMeterSpec.groovy Sun Feb 24 21:49:09
2019
@@ -109,5 +109,9 @@ abstract class JMeterSpec extends Specif
         }
         return file
     }
+    
+    protected static boolean isHeadless() {
+        System.properties['java.awt.headless'] == 'true'
+    }
 
 }



Mime
View raw message