[Schmitzm-commits] r1099 - in trunk/src_junit: schmitzm/jfree/feature/style schmitzm/swing skrueger/i8n
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Oct 11 00:58:24 CEST 2010
Author: alfonx
Date: 2010-10-11 00:58:24 +0200 (Mon, 11 Oct 2010)
New Revision: 1099
Modified:
trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java
trunk/src_junit/schmitzm/swing/TestingUtil.java
trunk/src_junit/skrueger/i8n/SwitchLanguageDialogTest.java
Log:
Fixed test problems with extra headless checks.
Modified: trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java
===================================================================
--- trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java 2010-10-10 22:52:16 UTC (rev 1098)
+++ trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java 2010-10-10 22:58:24 UTC (rev 1099)
@@ -8,7 +8,6 @@
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
-import java.awt.GraphicsEnvironment;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.File;
@@ -20,8 +19,6 @@
import org.apache.log4j.Logger;
import org.geotools.feature.FeatureCollection;
-import org.geotools.filter.text.cql2.CQLException;
-import org.jfree.chart.ChartFrame;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.AxisState;
import org.jfree.chart.axis.NumberAxis;
Modified: trunk/src_junit/schmitzm/swing/TestingUtil.java
===================================================================
--- trunk/src_junit/schmitzm/swing/TestingUtil.java 2010-10-10 22:52:16 UTC (rev 1098)
+++ trunk/src_junit/schmitzm/swing/TestingUtil.java 2010-10-10 22:58:24 UTC (rev 1099)
@@ -33,6 +33,7 @@
import org.geotools.renderer.lite.StreamingRenderer;
import org.jfree.chart.ChartFrame;
import org.jfree.chart.JFreeChart;
+import org.junit.Ignore;
import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.simple.SimpleFeatureType;
@@ -44,6 +45,10 @@
/**
* Helpers to test Swing applications.
*/
+
+ at Ignore
+// If not Ignored, HUDSON will complain
+// "java.lang.Exception: No runnable methods"
public class TestingUtil {
/**
@@ -112,7 +117,8 @@
while (w.isVisible() && !stopFlag.get()) {
LangUtil.sleepExceptionless(100);
if (waitMax >= 0 && countWait++ > waitMax * 10) {
- // waitMax < 0 will never brake the waiting and never increase the countWait
+ // waitMax < 0 will never brake the waiting and never increase
+ // the countWait
break;
}
}
Modified: trunk/src_junit/skrueger/i8n/SwitchLanguageDialogTest.java
===================================================================
--- trunk/src_junit/skrueger/i8n/SwitchLanguageDialogTest.java 2010-10-10 22:52:16 UTC (rev 1098)
+++ trunk/src_junit/skrueger/i8n/SwitchLanguageDialogTest.java 2010-10-10 22:58:24 UTC (rev 1099)
@@ -41,15 +41,25 @@
@Test
public void testDialog() throws Throwable {
+
+ if (!TestingUtil.INTERACTIVE)
+ // Test needed here because following GUI creation would crash
+ // without X11 DISPLAY
+ return;
+
ArrayList<String> langs = new ArrayList<String>();
langs.add("fr");
langs.add("tr");
-
TestingUtil.testGui(new SwitchLanguageDialog(null, langs, false), 10);
}
@Test
public void testDialogDoesntAppearIf0OrOneLangOnly() throws Throwable {
+ if (!TestingUtil.INTERACTIVE)
+ // Test needed here because following GUI creation would crash
+ // without X11 DISPLAY
+ return;
+
ArrayList<String> langs = new ArrayList<String>();
langs.add("fr");
More information about the Schmitzm-commits
mailing list