Index: /trunk/test/unit/org/openstreetmap/josm/data/cache/HostLimitQueueTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/cache/HostLimitQueueTest.java	(revision 11447)
+++ /trunk/test/unit/org/openstreetmap/josm/data/cache/HostLimitQueueTest.java	(revision 11448)
@@ -14,4 +14,5 @@
 import org.junit.Rule;
 import org.junit.Test;
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.tools.Utils;
@@ -22,5 +23,4 @@
  * Simple tests for ThreadPoolExecutor / HostLimitQueue veryfing, that this pair works OK
  * @author Wiktor Niesiobedzki
- *
  */
 public class HostLimitQueueTest {
@@ -31,5 +31,4 @@
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public JOSMTestRules test = new JOSMTestRules().preferences().timeout(20 * 1000);
-
 
     private static ThreadPoolExecutor getNewThreadPoolExecutor(String nameFormat, int workers, int queueLimit) {
@@ -53,11 +52,9 @@
         private URL url;
         private AtomicInteger counter;
-        private int id;
 
-        public Task(ICacheAccess<String, CacheEntry> cache, URL url, AtomicInteger counter, int id) {
+        Task(ICacheAccess<String, CacheEntry> cache, URL url, AtomicInteger counter) {
             super(cache, 1, 1, null);
             this.url = url;
             this.counter = counter;
-            this.id = id;
         }
 
@@ -67,4 +64,5 @@
                 Thread.sleep(1000);
             } catch (InterruptedException e) {
+                Main.trace(e);
             } finally {
                 this.counter.incrementAndGet();
@@ -91,9 +89,8 @@
     /**
      * Check if single threaded execution works properly
-     * @throws InterruptedException
-     * @throws IOException
+     * @throws Exception in case of error
      */
     @Test
-    public void test_single_thread_per_host() throws InterruptedException, IOException {
+    public void test_single_thread_per_host() throws Exception {
         ThreadPoolExecutor tpe = getNewThreadPoolExecutor("test-%d", 3, 1);
         ICacheAccess<String, CacheEntry> cache = JCSCacheManager.getCache("test", 3, 0, "");
@@ -101,5 +98,5 @@
         long start = System.currentTimeMillis();
         for (int i = 0; i < 10; i++) {
-            tpe.execute(new Task(cache, new URL("http://localhost/"+i), counter, i));
+            tpe.execute(new Task(cache, new URL("http://localhost/"+i), counter));
         }
         tpe.shutdown();
@@ -111,14 +108,14 @@
         // so it should take ~10 seconds to finish
         // if it's shorter, it means that host limit does not work
-        assertTrue("Expected duration between 9 and 11 seconds not met. Actual duration: " + (duration /1000), duration < 11*1000 & duration > 9*1000 );
+        assertTrue("Expected duration between 9 and 11 seconds not met. Actual duration: " + (duration /1000),
+                duration < 11*1000 & duration > 9*1000);
     }
 
     /**
      * Check if two threaded execution work properly
-     * @throws InterruptedException
-     * @throws IOException
+     * @throws Exception in case of error
      */
     @Test
-    public void test_multiple_thread_per_host() throws InterruptedException, IOException {
+    public void test_multiple_thread_per_host() throws Exception {
         ThreadPoolExecutor tpe = getNewThreadPoolExecutor("test-%d", 3, 2);
         ICacheAccess<String, CacheEntry> cache = JCSCacheManager.getCache("test", 3, 0, "");
@@ -126,5 +123,5 @@
         long start = System.currentTimeMillis();
         for (int i = 0; i < 10; i++) {
-            tpe.execute(new Task(cache, new URL("http://hostlocal/"+i), counter, i));
+            tpe.execute(new Task(cache, new URL("http://hostlocal/"+i), counter));
         }
         tpe.shutdown();
@@ -136,14 +133,14 @@
         // so it should take ~5 seconds to finish
         // if it's shorter, it means that host limit does not work
-        assertTrue("Expected duration between 4 and 6 seconds not met. Actual duration: " + (duration /1000), duration < 6*1000 & duration > 4*1000 );
+        assertTrue("Expected duration between 4 and 6 seconds not met. Actual duration: " + (duration /1000),
+                duration < 6*1000 & duration > 4*1000);
     }
 
     /**
      * Check two hosts
-     * @throws InterruptedException
-     * @throws IOException
+     * @throws Exception in case of error
      */
     @Test
-    public void test_two_hosts() throws InterruptedException, IOException {
+    public void test_two_hosts() throws Exception {
         ThreadPoolExecutor tpe = getNewThreadPoolExecutor("test-%d", 3, 1);
         ICacheAccess<String, CacheEntry> cache = JCSCacheManager.getCache("test", 3, 0, "");
@@ -152,5 +149,5 @@
         for (int i = 0; i < 10; i++) {
             String url = (i % 2 == 0) ? "http://localhost" : "http://hostlocal";
-            tpe.execute(new Task(cache, new URL(url+i), counter, i));
+            tpe.execute(new Task(cache, new URL(url+i), counter));
         }
         tpe.shutdown();
@@ -162,6 +159,6 @@
         // so it should take ~5 seconds to finish
         // if it's shorter, it means that host limit does not work
-        assertTrue("Expected duration between 4 and 6 seconds not met. Actual duration: " + (duration /1000), duration < 6*1000 & duration > 4*1000 );
+        assertTrue("Expected duration between 4 and 6 seconds not met. Actual duration: " + (duration /1000),
+                duration < 6*1000 & duration > 4*1000);
     }
-
 }
