accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [28/50] [abbrv] git commit: ACCUMULO-1537 fix race condition for scan timeouts
Date Wed, 17 Jul 2013 02:33:30 GMT
ACCUMULO-1537 fix race condition for scan timeouts

git-svn-id: https://svn.apache.org/repos/asf/accumulo/trunk@1501884 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0b6b7349
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0b6b7349
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0b6b7349

Branch: refs/heads/ACCUMULO-1496
Commit: 0b6b7349c865500d8cbc7b6ca21c5668b2bb8841
Parents: 22cff66
Author: Eric C. Newton <ecn@apache.org>
Authored: Wed Jul 10 18:00:21 2013 +0000
Committer: Eric C. Newton <ecn@apache.org>
Committed: Wed Jul 10 18:00:21 2013 +0000

----------------------------------------------------------------------
 .../java/org/apache/accumulo/test/functional/TimeoutIT.java | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0b6b7349/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java b/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java
index 6c7fa75..138584a 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/TimeoutIT.java
@@ -42,7 +42,7 @@ import org.junit.Test;
  */
 public class TimeoutIT extends MacTest {
   
-  @Test(timeout=30*1000)
+  @Test(timeout=60*1000)
   public void run() throws Exception {
     Connector conn = getConnector();
     testBatchWriterTimeout(conn);
@@ -84,11 +84,9 @@ public class TimeoutIT extends MacTest {
     m.put("cf1", "cq4", "v4");
     
     bw.addMutation(m);
-    
     bw.close();
     
     BatchScanner bs = getConnector().createBatchScanner("timeout", Authorizations.EMPTY,
2);
-    bs.setTimeout(1, TimeUnit.SECONDS);
     bs.setRanges(Collections.singletonList(new Range()));
     
     // should not timeout
@@ -96,10 +94,10 @@ public class TimeoutIT extends MacTest {
       entry.getKey();
     }
     
+    bs.setTimeout(5, TimeUnit.SECONDS);
     IteratorSetting iterSetting = new IteratorSetting(100, SlowIterator.class);
     iterSetting.addOption("sleepTime", 2000 + "");
-    getConnector().tableOperations().attachIterator("timeout", iterSetting);
-    UtilWaitThread.sleep(250);
+    bs.addScanIterator(iterSetting);
     
     try {
       for (Entry<Key,Value> entry : bs) {
@@ -109,7 +107,6 @@ public class TimeoutIT extends MacTest {
     } catch (TimedOutException toe) {
       // toe.printStackTrace();
     }
-    
     bs.close();
   }
   


Mime
View raw message