From 27a31693129c893ed09ab997952178d283db88b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20L=C3=A9aut=C3=A9?= Date: Fri, 19 Dec 2014 16:26:28 -0800 Subject: [PATCH] increase test timeouts --- .../segment/data/CompressionStrategyTest.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/processing/src/test/java/io/druid/segment/data/CompressionStrategyTest.java b/processing/src/test/java/io/druid/segment/data/CompressionStrategyTest.java index 8c7ce610679..eda59ed6615 100644 --- a/processing/src/test/java/io/druid/segment/data/CompressionStrategyTest.java +++ b/processing/src/test/java/io/druid/segment/data/CompressionStrategyTest.java @@ -25,16 +25,12 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; -import io.druid.segment.CompressedPools; import org.junit.Assert; -import org.junit.Before; import org.junit.BeforeClass; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import java.nio.BufferOverflowException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Arrays; @@ -44,12 +40,10 @@ import java.util.Random; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; @RunWith(Parameterized.class) public class CompressionStrategyTest @@ -124,8 +118,8 @@ public class CompressionStrategyTest Assert.assertArrayEquals("Uncompressed data does not match", originalData, checkArray); } - @Test - public void testConcurrency() throws InterruptedException, ExecutionException, TimeoutException + @Test(timeout = 60000) + public void testConcurrency() throws Exception { final int numThreads = 20; BlockingQueue queue = new ArrayBlockingQueue<>(numThreads); @@ -159,13 +153,13 @@ public class CompressionStrategyTest } threadPoolExecutor.shutdown(); for (Future result : results) { - Assert.assertTrue((Boolean) result.get(100, TimeUnit.MILLISECONDS)); + Assert.assertTrue((Boolean) result.get()); } } - @Test(timeout = 120000) - public void testKnownSizeConcurrency() throws InterruptedException, ExecutionException, TimeoutException + @Test(timeout = 60000) + public void testKnownSizeConcurrency() throws Exception { final int numThreads = 20;