Index: trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java	(revision 10563)
+++ trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java	(revision 10569)
@@ -4,10 +4,9 @@
 import java.io.File;
 import java.io.IOException;
+import java.text.MessageFormat;
 import java.util.TimeZone;
 
-import org.junit.rules.DisableOnDebug;
 import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestRule;
-import org.junit.rules.Timeout;
 import org.junit.runner.Description;
 import org.junit.runners.model.InitializationError;
@@ -33,5 +32,5 @@
  */
 public class JOSMTestRules implements TestRule {
-    private Timeout timeout = Timeout.seconds(10);
+    private int timeout = 10 * 1000;
     private TemporaryFolder josmHome;
     private boolean usePreferences = false;
@@ -46,5 +45,5 @@
      */
     public JOSMTestRules noTimeout() {
-        timeout = null;
+        timeout = -1;
         return this;
     }
@@ -56,5 +55,5 @@
      */
     public JOSMTestRules timeout(int millis) {
-        timeout = Timeout.millis(millis);
+        timeout = millis;
         return this;
     }
@@ -135,19 +134,11 @@
 
     @Override
-    public Statement apply(final Statement base, Description description) {
-        Statement statement = new Statement() {
-            @Override
-            public void evaluate() throws Throwable {
-                before();
-                try {
-                    base.evaluate();
-                } finally {
-                    after();
-                }
-            }
-        };
-        if (timeout != null) {
-            statement = new DisableOnDebug(timeout).apply(statement, description);
-        }
+    public Statement apply(Statement base, Description description) {
+        Statement statement = base;
+        if (timeout > 0) {
+            // TODO: new DisableOnDebug(timeout)
+            statement = new FailOnTimeoutStatement(statement, timeout);
+        }
+        statement = new CreateJosmEnvironment(statement);
         if (josmHome != null) {
             statement = josmHome.apply(statement, description);
@@ -254,6 +245,81 @@
     }
 
+    private final class CreateJosmEnvironment extends Statement {
+        private final Statement base;
+
+        private CreateJosmEnvironment(Statement base) {
+            this.base = base;
+        }
+
+        @Override
+        public void evaluate() throws Throwable {
+            before();
+            try {
+                base.evaluate();
+            } finally {
+                after();
+            }
+        }
+    }
+
     enum APIType {
         NONE, FAKE, DEV
     }
+
+    /**
+     * The junit timeout statement has problems when switchting timezones. This one does not.
+     * @author Michael Zangl
+     */
+    private static class FailOnTimeoutStatement extends Statement {
+
+        private int timeout;
+        private Statement original;
+
+        FailOnTimeoutStatement(Statement original, int timeout) {
+            this.original = original;
+            this.timeout = timeout;
+        }
+
+        @Override
+        public void evaluate() throws Throwable {
+            TimeoutThread thread = new TimeoutThread(original);
+            thread.setDaemon(true);
+            thread.start();
+            thread.join(timeout);
+            thread.interrupt();
+            if (!thread.isDone) {
+                Throwable exception = thread.getExecutionException();
+                if (exception != null) {
+                    throw exception;
+                } else {
+                    throw new Exception(MessageFormat.format("Test timed out after {0}ms", timeout));
+                }
+            }
+        }
+    }
+
+    private static final class TimeoutThread extends Thread {
+        public boolean isDone;
+        private Statement original;
+        private Throwable exceptionCaught;
+
+        private TimeoutThread(Statement original) {
+            super("Timeout runner");
+            this.original = original;
+        }
+
+        public Throwable getExecutionException() {
+            return exceptionCaught;
+        }
+
+        @Override
+        public void run() {
+            try {
+                original.evaluate();
+                isDone = true;
+            } catch (Throwable e) {
+                exceptionCaught = e;
+            }
+        }
+    }
 }
Index: trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java	(revision 10563)
+++ trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java	(revision 10569)
@@ -35,5 +35,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().timeout(60000);
+    public JOSMTestRules test = new JOSMTestRules();
 
     private File orientationSampleFile, directionSampleFile;
Index: trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java	(revision 10563)
+++ trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java	(revision 10569)
@@ -23,9 +23,11 @@
 
     /**
-     * Set the timezone and no timeout (junit timeout task seems to have problems with it when switching time zones).
+     * Set the timezone and timeout.
+     * <p>
+     * Timeouts need to be disabled because we change the time zone.
      */
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().i18n().preferences().noTimeout();
+    public JOSMTestRules test = new JOSMTestRules().i18n().preferences();
 
     /**
