fluo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [fluo] branch master updated: fixes #793 Modify ITs to use JUnit timeout rule (#963)
Date Wed, 01 Nov 2017 13:59:19 GMT
This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/fluo.git


The following commit(s) were added to refs/heads/master by this push:
     new 28816d2  fixes #793 Modify ITs to use JUnit timeout rule (#963)
28816d2 is described below

commit 28816d273331bcb8db2a631abb78938706e1b18c
Author: Kenneth McFarland <kennethpaulmcfarland@gmail.com>
AuthorDate: Fri Oct 27 22:19:53 2017 -0700

    fixes #793 Modify ITs to use JUnit timeout rule (#963)
---
 .../src/test/java/org/apache/fluo/integration/ITBase.java   | 13 +++++++++++++
 .../apache/fluo/integration/accumulo/TimeskippingIT.java    |  4 ++++
 .../org/apache/fluo/integration/client/FluoAdminImplIT.java |  4 ++++
 .../org/apache/fluo/integration/client/FluoClientIT.java    |  4 ++++
 .../apache/fluo/integration/client/LoaderExecutorIT.java    |  4 ++++
 .../org/apache/fluo/integration/impl/ApiBehaviorIT.java     |  5 +++++
 .../java/org/apache/fluo/integration/impl/AppConfigIT.java  |  5 ++++-
 .../org/apache/fluo/integration/impl/ClientExceptionIT.java |  4 ++++
 .../java/org/apache/fluo/integration/impl/CollisionIT.java  |  2 +-
 .../java/org/apache/fluo/integration/impl/ColumnVisIT.java  |  4 ++++
 .../java/org/apache/fluo/integration/impl/FailureIT.java    |  4 +++-
 .../test/java/org/apache/fluo/integration/impl/FluoIT.java  |  5 ++++-
 .../fluo/integration/impl/GarbageCollectionIteratorIT.java  | 10 +++++++---
 .../test/java/org/apache/fluo/integration/impl/MiniIT.java  |  5 +++++
 .../org/apache/fluo/integration/impl/NotificationGcIT.java  |  5 ++++-
 .../org/apache/fluo/integration/impl/ObserverConfigIT.java  |  4 ++++
 .../java/org/apache/fluo/integration/impl/OracleIT.java     |  2 +-
 .../org/apache/fluo/integration/impl/ParallelScannerIT.java |  4 ++++
 .../java/org/apache/fluo/integration/impl/ScannerIT.java    |  5 ++++-
 .../apache/fluo/integration/impl/SelfNotificationIT.java    |  4 ++++
 .../org/apache/fluo/integration/impl/StochasticBankIT.java  |  4 ++++
 .../apache/fluo/integration/impl/StrongNotificationIT.java  |  4 ++++
 .../apache/fluo/integration/impl/TimestampTrackerIT.java    |  4 ++++
 .../java/org/apache/fluo/integration/impl/TransactorIT.java |  3 +++
 .../apache/fluo/integration/impl/WeakNotificationIT.java    |  7 +++++--
 .../fluo/integration/impl/WeakNotificationOverlapIT.java    |  5 ++++-
 .../java/org/apache/fluo/integration/impl/WorkerIT.java     |  7 +++++--
 .../java/org/apache/fluo/integration/impl/ZKSecretIT.java   |  5 ++++-
 .../test/java/org/apache/fluo/integration/log/LogIT.java    |  6 ++++--
 29 files changed, 124 insertions(+), 18 deletions(-)

diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/ITBase.java b/modules/integration/src/test/java/org/apache/fluo/integration/ITBase.java
index b16c790..57299e9 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/ITBase.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/ITBase.java
@@ -58,6 +58,19 @@ public class ITBase {
   private static AtomicInteger tableCounter = new AtomicInteger(1);
   protected static AtomicInteger testCounter = new AtomicInteger();
 
+  private final static long JUNIT_TIMEOUT_SECONDS = 120;
+
+  /** 
+   * Gets the duration a test will run before timing out under the JUnit rule. 
+   * This value is in seconds.
+   * 
+   * @return long representation of the time in seconds
+   * @since 1.2.0
+   */
+  public static long getTestTimeout() {
+    return JUNIT_TIMEOUT_SECONDS;
+  }
+
   @BeforeClass
   public static void setUpAccumulo() throws Exception {
     instanceName = System.getProperty(IT_INSTANCE_NAME_PROP, "it-instance-default");
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/accumulo/TimeskippingIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/accumulo/TimeskippingIT.java
index 68bb138..eaecc29 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/accumulo/TimeskippingIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/accumulo/TimeskippingIT.java
@@ -24,11 +24,15 @@ import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.fluo.integration.ITBase;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class TimeskippingIT extends ITBase {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   private static final Logger log = LoggerFactory.getLogger(TimeskippingIT.class);
 
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/client/FluoAdminImplIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/client/FluoAdminImplIT.java
index b45a8b7..4a6a5cf 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/client/FluoAdminImplIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/client/FluoAdminImplIT.java
@@ -27,12 +27,16 @@ import org.apache.fluo.core.client.FluoClientImpl;
 import org.apache.fluo.core.util.CuratorUtil;
 import org.apache.fluo.integration.ITBaseImpl;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 public class FluoAdminImplIT extends ITBaseImpl {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   @Test
   public void testInitializeTwiceFails() throws Exception {
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/client/FluoClientIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/client/FluoClientIT.java
index 3dfd35f..2ae0ae3 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/client/FluoClientIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/client/FluoClientIT.java
@@ -24,9 +24,13 @@ import org.apache.fluo.integration.ITBaseImpl;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 public class FluoClientIT extends ITBaseImpl {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   @Test
   public void testBasic() {
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/client/LoaderExecutorIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/client/LoaderExecutorIT.java
index 6fdb5c1..36bf0ab 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/client/LoaderExecutorIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/client/LoaderExecutorIT.java
@@ -22,11 +22,15 @@ import org.apache.fluo.api.data.Column;
 import org.apache.fluo.api.exceptions.AlreadySetException;
 import org.apache.fluo.integration.ITBaseMini;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 public class LoaderExecutorIT extends ITBaseMini {
 
   public static class BadLoader implements Loader {
+    @Rule
+    public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
     @Override
     public void load(TransactionBase tx, Context context) throws Exception {
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ApiBehaviorIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ApiBehaviorIT.java
index b343a5d..b3c3bb6 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ApiBehaviorIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ApiBehaviorIT.java
@@ -24,9 +24,14 @@ import org.apache.fluo.api.data.RowColumn;
 import org.apache.fluo.integration.ITBaseImpl;
 import org.apache.fluo.integration.TestTransaction;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 public class ApiBehaviorIT extends ITBaseImpl {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
+
   @Test
   public void testGetNonexistant() {
 
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/AppConfigIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/AppConfigIT.java
index 809eba7..332a3da 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/AppConfigIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/AppConfigIT.java
@@ -27,12 +27,15 @@ import org.apache.fluo.api.data.Column;
 import org.apache.fluo.api.observer.ObserverProvider;
 import org.apache.fluo.integration.ITBaseMini;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 import static org.apache.fluo.api.observer.Observer.NotificationType.STRONG;
 
 public class AppConfigIT extends ITBaseMini {
-
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
   public static final Column DF_COL = new Column("data", "foo");
   public static final Column DB_COL = new Column("data", "bar");
 
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ClientExceptionIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ClientExceptionIT.java
index 9807101..ce5dbdc 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ClientExceptionIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ClientExceptionIT.java
@@ -21,12 +21,16 @@ import org.apache.fluo.api.data.Column;
 import org.apache.fluo.api.exceptions.AlreadySetException;
 import org.apache.fluo.integration.ITBaseMini;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 /**
  * Integration test to verify exceptions thrown by Fluo client
  */
 public class ClientExceptionIT extends ITBaseMini {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   @Test
   public void testAlreadySetException() {
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/CollisionIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/CollisionIT.java
index 6e9abe4..4fcf98a 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/CollisionIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/CollisionIT.java
@@ -62,7 +62,7 @@ public class CollisionIT extends ITBaseMini {
   private static final Column STAT_PROCESSED = new Column("stat", "processed");
 
   @Rule
-  public Timeout globalTimeout = Timeout.seconds(60);
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   private static class NumLoader implements Loader {
 
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ColumnVisIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ColumnVisIT.java
index 2f94b26..27ac954 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ColumnVisIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ColumnVisIT.java
@@ -21,9 +21,13 @@ import com.google.common.collect.Sets;
 import org.apache.fluo.api.data.Column;
 import org.apache.fluo.integration.ITBaseImpl;
 import org.apache.fluo.integration.TestTransaction;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 public class ColumnVisIT extends ITBaseImpl {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   @Test(expected = Exception.class)
   public void testFailFastSet() {
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/FailureIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/FailureIT.java
index e18d72a..519274d 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/FailureIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/FailureIT.java
@@ -51,12 +51,14 @@ import org.junit.Assert;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
+import org.junit.rules.Timeout;
 
 import static org.apache.fluo.api.observer.Observer.NotificationType.STRONG;
 import static org.apache.fluo.integration.BankUtil.BALANCE;
 
 public class FailureIT extends ITBaseImpl {
-
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
   @Rule
   public ExpectedException exception = ExpectedException.none();
 
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/FluoIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/FluoIT.java
index bd17025..4299fab 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/FluoIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/FluoIT.java
@@ -32,7 +32,6 @@ import org.apache.fluo.api.config.FluoConfiguration;
 import org.apache.fluo.api.data.Bytes;
 import org.apache.fluo.api.data.Column;
 import org.apache.fluo.api.data.RowColumnValue;
-import org.apache.fluo.api.data.Span;
 import org.apache.fluo.api.exceptions.CommitException;
 import org.apache.fluo.api.observer.Observer.NotificationType;
 import org.apache.fluo.api.observer.ObserverProvider;
@@ -44,11 +43,15 @@ import org.apache.fluo.integration.ITBaseImpl;
 import org.apache.fluo.integration.TestTransaction;
 import org.apache.fluo.integration.TestUtil;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 import static org.apache.fluo.integration.BankUtil.BALANCE;
 
 public class FluoIT extends ITBaseImpl {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   public static class FluoITObserverProvider implements ObserverProvider {
     @Override
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/GarbageCollectionIteratorIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/GarbageCollectionIteratorIT.java
index bf5d746..bdb4b51 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/GarbageCollectionIteratorIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/GarbageCollectionIteratorIT.java
@@ -38,12 +38,16 @@ import org.apache.fluo.integration.TestTransaction;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 /**
  * Tests GarbageCollectionIterator class
  */
 public class GarbageCollectionIteratorIT extends ITBaseImpl {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   private void waitForGcTime(long expectedTime) throws Exception {
     env.getSharedResources().getTimestampTracker().updateZkNode();
@@ -54,7 +58,7 @@ public class GarbageCollectionIteratorIT extends ITBaseImpl {
     }
   }
 
-  @Test(timeout = 60000)
+
   public void testVerifyAfterGC() throws Exception {
 
     TestTransaction tx1 = new TestTransaction(env);
@@ -87,7 +91,7 @@ public class GarbageCollectionIteratorIT extends ITBaseImpl {
     tx2.done();
   }
 
-  @Test(timeout = 60000)
+
   public void testDeletedDataIsDropped() throws Exception {
 
     final Column docUri = new Column("doc", "uri");
@@ -126,7 +130,7 @@ public class GarbageCollectionIteratorIT extends ITBaseImpl {
     tx4.done();
   }
 
-  @Test(timeout = 60000)
+
   public void testRolledBackDataIsDropped() throws Exception {
 
     Column col1 = new Column("fam1", "q1");
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/MiniIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/MiniIT.java
index 095e939..1739e8a 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/MiniIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/MiniIT.java
@@ -26,13 +26,18 @@ import org.apache.fluo.api.config.FluoConfiguration;
 import org.apache.fluo.api.data.Bytes;
 import org.apache.fluo.api.data.Column;
 import org.apache.fluo.api.mini.MiniFluo;
+import org.apache.fluo.integration.ITBase;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 /**
  * Tests MiniFluo
  */
 public class MiniIT {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(ITBase.getTestTimeout());
 
   @Test
   public void testMini() throws Exception {
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/NotificationGcIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/NotificationGcIT.java
index e0a08ac..b308197 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/NotificationGcIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/NotificationGcIT.java
@@ -31,12 +31,15 @@ import org.apache.fluo.integration.ITBaseMini;
 import org.apache.fluo.integration.TestTransaction;
 import org.apache.fluo.integration.impl.WeakNotificationIT.WeakNotificationITObserverProvider;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class NotificationGcIT extends ITBaseMini {
-
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
   private static final Logger log = LoggerFactory.getLogger(NotificationGcIT.class);
 
   private static void assertRawNotifications(int expected, Environment env) throws Exception
{
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ObserverConfigIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ObserverConfigIT.java
index 0ab398a..c29de58 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ObserverConfigIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ObserverConfigIT.java
@@ -34,12 +34,16 @@ import org.apache.fluo.api.observer.AbstractObserver;
 import org.apache.fluo.api.observer.Observer.NotificationType;
 import org.apache.fluo.integration.ITBaseMini;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 @Deprecated
 public class ObserverConfigIT extends ITBaseMini {
 
   public static class ConfigurableObserver extends AbstractObserver {
+    @Rule
+    public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
     private ObservedColumn observedColumn;
     private Bytes outputCQ;
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/OracleIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/OracleIT.java
index e543c3c..9bcfb17 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/OracleIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/OracleIT.java
@@ -47,7 +47,7 @@ import static org.junit.Assert.assertTrue;
 public class OracleIT extends ITBaseImpl {
 
   @Rule
-  public Timeout globalTimeout = Timeout.seconds(60);
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   @Test
   public void testRestart() throws Exception {
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ParallelScannerIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ParallelScannerIT.java
index 63e0807..ae0ebd1 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ParallelScannerIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ParallelScannerIT.java
@@ -29,9 +29,13 @@ import org.apache.fluo.core.oracle.Stamp;
 import org.apache.fluo.integration.ITBaseImpl;
 import org.apache.fluo.integration.TestTransaction;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 public class ParallelScannerIT extends ITBaseImpl {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   @Test
   public void testRowColumn() {
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ScannerIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ScannerIT.java
index f9cb31e..e5a8d02 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ScannerIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ScannerIT.java
@@ -29,12 +29,15 @@ import org.apache.fluo.api.data.Bytes;
 import org.apache.fluo.api.data.Column;
 import org.apache.fluo.api.data.ColumnValue;
 import org.apache.fluo.api.data.RowColumnValue;
-import org.apache.fluo.api.data.Span;
 import org.apache.fluo.integration.ITBaseImpl;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 public class ScannerIT extends ITBaseImpl {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   @Test
   public void testFiltering() {
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/SelfNotificationIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/SelfNotificationIT.java
index 345bde2..2e9eb42 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/SelfNotificationIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/SelfNotificationIT.java
@@ -28,7 +28,9 @@ import org.apache.fluo.api.observer.Observer;
 import org.apache.fluo.api.observer.ObserverProvider;
 import org.apache.fluo.integration.ITBaseMini;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 import static org.apache.fluo.api.observer.Observer.NotificationType.STRONG;
 
@@ -36,6 +38,8 @@ import static org.apache.fluo.api.observer.Observer.NotificationType.STRONG;
  * Test an observer notifying the column its observing. This is a useful pattern for exporting
data.
  */
 public class SelfNotificationIT extends ITBaseMini {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   private static final Column STAT_COUNT_COL = new Column("stat", "count");
   private static final Column EXPORT_CHECK_COL = new Column("export", "check");
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/StochasticBankIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/StochasticBankIT.java
index 8afa320..6c6e6de 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/StochasticBankIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/StochasticBankIT.java
@@ -42,7 +42,9 @@ import org.apache.fluo.integration.ITBaseImpl;
 import org.apache.fluo.integration.TestTransaction;
 import org.apache.hadoop.io.Text;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -51,6 +53,8 @@ import org.slf4j.LoggerFactory;
  * sum of all money in the bank should be the same, therefore the average should not vary.
  */
 public class StochasticBankIT extends ITBaseImpl {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout() * 2);
 
   private static final Logger log = LoggerFactory.getLogger(StochasticBankIT.class);
   private static AtomicInteger txCount = new AtomicInteger();
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/StrongNotificationIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/StrongNotificationIT.java
index 018771f..cabbade 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/StrongNotificationIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/StrongNotificationIT.java
@@ -25,11 +25,15 @@ import org.apache.fluo.core.impl.TransactorNode;
 import org.apache.fluo.integration.ITBaseMini;
 import org.apache.fluo.integration.TestTransaction;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 import static org.apache.fluo.api.observer.Observer.NotificationType.STRONG;
 
 public class StrongNotificationIT extends ITBaseMini {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   private static final Column OC = new Column("f", "q");
   private static final Column RC = new Column("f", "r");
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/TimestampTrackerIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/TimestampTrackerIT.java
index 3712813..349a571 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/TimestampTrackerIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/TimestampTrackerIT.java
@@ -27,12 +27,16 @@ import org.apache.fluo.core.impl.TransactorID;
 import org.apache.fluo.integration.ITBaseImpl;
 import org.apache.zookeeper.KeeperException.NoNodeException;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 /**
  * Tests TimestampTracker class
  */
 public class TimestampTrackerIT extends ITBaseImpl {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   @Test(expected = NoSuchElementException.class)
   public void testTsNoElement() {
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/TransactorIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/TransactorIT.java
index 00e05a9..c810285 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/TransactorIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/TransactorIT.java
@@ -24,11 +24,14 @@ import org.junit.Assert;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
+import org.junit.rules.Timeout;
 
 /**
  * Tests transactor classes
  */
 public class TransactorIT extends ITBaseImpl {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   public static Long id1 = Long.valueOf(2);
   public static Long id2 = Long.valueOf(3);
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/WeakNotificationIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/WeakNotificationIT.java
index 3add9b5..bb39f90 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/WeakNotificationIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/WeakNotificationIT.java
@@ -21,7 +21,6 @@ import org.apache.fluo.api.client.scanner.CellScanner;
 import org.apache.fluo.api.data.Bytes;
 import org.apache.fluo.api.data.Column;
 import org.apache.fluo.api.data.RowColumnValue;
-import org.apache.fluo.api.data.Span;
 import org.apache.fluo.api.observer.Observer;
 import org.apache.fluo.api.observer.ObserverProvider;
 import org.apache.fluo.core.impl.Environment;
@@ -31,11 +30,15 @@ import org.apache.fluo.integration.ITBaseMini;
 import org.apache.fluo.integration.TestTransaction;
 import org.apache.fluo.integration.TestUtil;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 import static org.apache.fluo.api.observer.Observer.NotificationType.WEAK;
 
 public class WeakNotificationIT extends ITBaseMini {
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
   private static final Column STAT_COUNT = new Column("stat", "count");
   private static final Column STAT_CHECK = new Column("stat", "check");
@@ -125,7 +128,7 @@ public class WeakNotificationIT extends ITBaseMini {
     env.close();
   }
 
-  @Test(timeout = 30000)
+
   public void testNOOP() throws Exception {
     // if an observer makes not updates in a transaction, it should still delete the weak
     // notification
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/WeakNotificationOverlapIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/WeakNotificationOverlapIT.java
index 0711c72..2efb087 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/WeakNotificationOverlapIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/WeakNotificationOverlapIT.java
@@ -34,12 +34,15 @@ import org.apache.fluo.integration.ITBaseImpl;
 import org.apache.fluo.integration.TestTransaction;
 import org.apache.fluo.integration.TestUtil;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 import static org.apache.fluo.api.observer.Observer.NotificationType.WEAK;
 
 public class WeakNotificationOverlapIT extends ITBaseImpl {
-
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
   private static final Column STAT_TOTAL = new Column("stat", "total");
   private static final Column STAT_PROCESSED = new Column("stat", "processed");
   private static final Column STAT_CHANGED = new Column("stat", "changed");
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/WorkerIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/WorkerIT.java
index 6347a24..bd6d5cc 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/WorkerIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/WorkerIT.java
@@ -21,7 +21,6 @@ import org.apache.fluo.api.client.Transaction;
 import org.apache.fluo.api.client.TransactionBase;
 import org.apache.fluo.api.data.Column;
 import org.apache.fluo.api.data.RowColumn;
-import org.apache.fluo.api.data.Span;
 import org.apache.fluo.api.observer.ObserverProvider;
 import org.apache.fluo.api.observer.StringObserver;
 import org.apache.fluo.core.impl.Environment;
@@ -33,7 +32,9 @@ import org.apache.fluo.integration.ITBaseMini;
 import org.apache.fluo.integration.TestTransaction;
 import org.apache.fluo.mini.MiniFluoImpl;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 import static org.apache.fluo.api.observer.Observer.NotificationType.STRONG;
 
@@ -42,7 +43,9 @@ import static org.apache.fluo.api.observer.Observer.NotificationType.STRONG;
  * index of node degree.
  */
 public class WorkerIT extends ITBaseMini {
-
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout() * 2);
+  // timeout needs to be > 60secs for testMultipleFinders()
   private static final Column LAST_UPDATE = new Column("attr", "lastupdate");
   private static final Column DEGREE = new Column("attr", "degree");
 
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ZKSecretIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ZKSecretIT.java
index 4350f4b..1605d2b 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/impl/ZKSecretIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/impl/ZKSecretIT.java
@@ -27,20 +27,23 @@ import org.apache.fluo.api.client.FluoFactory;
 import org.apache.fluo.api.client.Snapshot;
 import org.apache.fluo.api.client.Transaction;
 import org.apache.fluo.api.config.FluoConfiguration;
-import org.apache.fluo.api.config.SimpleConfiguration;
 import org.apache.fluo.api.data.Column;
 import org.apache.fluo.api.observer.ObserverProvider;
 import org.apache.fluo.integration.ITBaseMini;
 import org.apache.zookeeper.KeeperException.NoAuthException;
 import org.apache.zookeeper.ZooKeeper;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 import static org.apache.fluo.api.observer.Observer.NotificationType.STRONG;
 
 public class ZKSecretIT extends ITBaseMini {
 
   public static class MyObserverProvider implements ObserverProvider {
+    @Rule
+    public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
 
     @Override
     public void provide(Registry or, Context ctx) {
diff --git a/modules/integration/src/test/java/org/apache/fluo/integration/log/LogIT.java
b/modules/integration/src/test/java/org/apache/fluo/integration/log/LogIT.java
index cca2c21..1736248 100644
--- a/modules/integration/src/test/java/org/apache/fluo/integration/log/LogIT.java
+++ b/modules/integration/src/test/java/org/apache/fluo/integration/log/LogIT.java
@@ -36,7 +36,6 @@ import org.apache.fluo.api.data.Column;
 import org.apache.fluo.api.data.ColumnValue;
 import org.apache.fluo.api.data.RowColumn;
 import org.apache.fluo.api.data.RowColumnValue;
-import org.apache.fluo.api.data.Span;
 import org.apache.fluo.api.observer.Observer;
 import org.apache.fluo.api.observer.ObserverProvider;
 import org.apache.fluo.api.observer.StringObserver;
@@ -48,12 +47,15 @@ import org.apache.log4j.Logger;
 import org.apache.log4j.PatternLayout;
 import org.apache.log4j.WriterAppender;
 import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.Timeout;
 
 import static org.apache.fluo.api.observer.Observer.NotificationType.WEAK;
 
 public class LogIT extends ITBaseMini {
-
+  @Rule
+  public Timeout globalTimeout = Timeout.seconds(getTestTimeout());
   private static final Column STAT_COUNT = new Column("stat", "count");
 
   static class SimpleLoader implements Loader {

-- 
To stop receiving notification emails like this one, please contact
['"commits@fluo.apache.org" <commits@fluo.apache.org>'].

Mime
View raw message