You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@omid.apache.org by ik...@apache.org on 2016/05/18 20:38:28 UTC

incubator-omid git commit: [OMID-27] Increase test timeouts in PersistenceProcessorTests

Repository: incubator-omid
Updated Branches:
  refs/heads/0.8.2.0 8d1c3404a -> e0d9fc4a5


[OMID-27] Increase test timeouts in PersistenceProcessorTests

In some environments (e.g. slow machines) PersistenceProcessor tests fail
because the specified default timeout is not sufficient.

Change-Id: Ib5c7fad6a2aa49bcc3da107a41adf9dc08031753


Project: http://git-wip-us.apache.org/repos/asf/incubator-omid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-omid/commit/e0d9fc4a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-omid/tree/e0d9fc4a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-omid/diff/e0d9fc4a

Branch: refs/heads/0.8.2.0
Commit: e0d9fc4a5334638ef296b2852063956ff735b6b2
Parents: 8d1c340
Author: Francisco Perez-Sorrosal <fp...@yahoo-inc.com>
Authored: Wed May 18 12:55:40 2016 -0700
Committer: Igor Katkov <ka...@yahoo-inc.com>
Committed: Wed May 18 13:36:09 2016 -0700

----------------------------------------------------------------------
 .../apache/omid/tso/TestPersistenceProcessor.java | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-omid/blob/e0d9fc4a/tso-server/src/test/java/org/apache/omid/tso/TestPersistenceProcessor.java
----------------------------------------------------------------------
diff --git a/tso-server/src/test/java/org/apache/omid/tso/TestPersistenceProcessor.java b/tso-server/src/test/java/org/apache/omid/tso/TestPersistenceProcessor.java
index 6e5c040..66381ba 100644
--- a/tso-server/src/test/java/org/apache/omid/tso/TestPersistenceProcessor.java
+++ b/tso-server/src/test/java/org/apache/omid/tso/TestPersistenceProcessor.java
@@ -95,7 +95,7 @@ public class TestPersistenceProcessor {
         Mockito.reset(mockWriter);
     }
 
-    @Test(timeOut = 10_000)
+    @Test(timeOut = 30_000)
     public void testLowWatermarkIsPersisted() throws Exception {
 
         TSOServerConfig tsoConfig = new TSOServerConfig();
@@ -129,7 +129,7 @@ public class TestPersistenceProcessor {
 
     }
 
-    @Test(timeOut = 10_000)
+    @Test(timeOut = 30_000)
     public void testCommitPersistenceWithSingleCommitTableWriter() throws Exception {
 
         final int NUM_CT_WRITERS = 1;
@@ -172,7 +172,7 @@ public class TestPersistenceProcessor {
 
     }
 
-    @Test(timeOut=10_000)
+    @Test(timeOut = 30_000)
     public void testCommitPersistenceWithMultipleCommitTableWriters() throws Exception {
 
         final int NUM_CT_WRITERS = 2;
@@ -242,7 +242,7 @@ public class TestPersistenceProcessor {
 
     }
 
-    @Test(timeOut=10_000)
+    @Test(timeOut = 30_000)
     public void testCommitPersistenceWithNonHALeaseManager() throws Exception {
 
         final int NUM_CT_WRITERS = 1;
@@ -285,7 +285,7 @@ public class TestPersistenceProcessor {
 
     }
 
-    @Test(timeOut=10_000)
+    @Test(timeOut = 30_000)
     public void testCommitPersistenceWithHALeaseManagerAndMinimumCommitTableWriters() throws Exception {
 
         final int NUM_PERSIST_HANDLERS = 2; // Minimum commit table writers is 2
@@ -300,7 +300,7 @@ public class TestPersistenceProcessor {
 
     }
 
-    @Test(timeOut=10_000)
+    @Test(timeOut = 30_000)
     public void testCommitPersistenceWithHALeaseManagerAndMultipleCommitTableWriters() throws Exception {
 
         final int NUM_CT_WRITERS = 4;
@@ -375,7 +375,6 @@ public class TestPersistenceProcessor {
 
         // Test: Configure the lease manager to return false for stillInLeasePeriod
         doReturn(false).when(simulatedHALeaseManager).stillInLeasePeriod();
-        //batchPool.notifyEmptyBatch(0); // Unlock this thread to check the panicker
         proc.addCommitToBatch(ANY_ST, ANY_CT, mock(Channel.class), mock(MonitoringContext.class));
         proc.triggerCurrentBatchFlush();
         verify(simulatedHALeaseManager, timeout(1000).times(1)).stillInLeasePeriod();
@@ -400,7 +399,6 @@ public class TestPersistenceProcessor {
         // Configure mock writer to flush unsuccessfully
         doThrow(new IOException("Unable to write")).when(mockWriter).flush();
         doReturn(true).doReturn(false).when(simulatedHALeaseManager).stillInLeasePeriod();
-//        batchPool.notifyEmptyBatch(0); // Unlock this thread to check the panicker
         proc.addCommitToBatch(ANY_ST, ANY_CT, mock(Channel.class), mock(MonitoringContext.class));
         proc.triggerCurrentBatchFlush();
         verify(simulatedHALeaseManager, timeout(1000).times(1)).stillInLeasePeriod();
@@ -425,7 +423,7 @@ public class TestPersistenceProcessor {
         return handlers;
     }
 
-    @Test(timeOut=10_000)
+    @Test(timeOut = 30_000)
     public void testCommitTableExceptionOnCommitPersistenceTakesDownDaemon() throws Exception {
 
         // Init lease management (doesn't matter if HA or not)
@@ -466,7 +464,7 @@ public class TestPersistenceProcessor {
 
     }
 
-    @Test(timeOut=10_000)
+    @Test(timeOut = 30_000)
     public void testRuntimeExceptionOnCommitPersistenceTakesDownDaemon() throws Exception {
 
         TSOServerConfig config = new TSOServerConfig();