bookkeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject bookkeeper git commit: BOOKKEEPER-839: AuditorPeriodicCheckTest timeout (rakeshr via sijie)
Date Thu, 12 Mar 2015 07:21:48 GMT
Repository: bookkeeper
Updated Branches:
  refs/heads/master 8b23bd30c -> e89ee080f


BOOKKEEPER-839: AuditorPeriodicCheckTest timeout (rakeshr via sijie)


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

Branch: refs/heads/master
Commit: e89ee080f1894143ed3415f27017b89eefe3ceb1
Parents: 8b23bd3
Author: Sijie Guo <sijie@apache.org>
Authored: Thu Mar 12 00:21:29 2015 -0700
Committer: Sijie Guo <sijie@apache.org>
Committed: Thu Mar 12 00:21:29 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                           |  2 ++
 .../replication/AuditorPeriodicCheckTest.java         | 14 +++++++-------
 2 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/e89ee080/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 8ccb6a8..c07b06e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -30,6 +30,8 @@ Trunk (unreleased changes)
 
       BOOKKEEPER-838: ForceWriteThread::run() leaks “logFile.close()” when interrupt
comes (zhaijia via sijie)
 
+      BOOKKEEPER-839: AuditorPeriodicCheckTest timeout (rakeshr via sijie)
+
     IMPROVEMENTS:
 
       BOOKKEEPER-800: Expose whether a ledger is closed or not (ivank)

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/e89ee080/bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/AuditorPeriodicCheckTest.java
----------------------------------------------------------------------
diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/AuditorPeriodicCheckTest.java
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/AuditorPeriodicCheckTest.java
index fd605a7..a44eff3 100644
--- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/AuditorPeriodicCheckTest.java
+++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/AuditorPeriodicCheckTest.java
@@ -210,12 +210,12 @@ public class AuditorPeriodicCheckTest extends BookKeeperClusterTestCase
{
     /**
      * Test that the period checker will not run when auto replication has been disabled
      */
-    @Test(timeout=60000)
+    @Test(timeout=120000)
     public void testPeriodicCheckWhenDisabled() throws Exception {
         LedgerManagerFactory mFactory = LedgerManagerFactory.newLedgerManagerFactory(bsConfs.get(0),
zkc);
         final LedgerUnderreplicationManager underReplicationManager = mFactory.newLedgerUnderreplicationManager();
-        final int numLedgers = 100;
-        final int numMsgs = 100;
+        final int numLedgers = 10;
+        final int numMsgs = 2;
         final CountDownLatch completeLatch = new CountDownLatch(numMsgs*numLedgers);
         final AtomicInteger rc = new AtomicInteger(BKException.Code.OK);
 
@@ -223,7 +223,7 @@ public class AuditorPeriodicCheckTest extends BookKeeperClusterTestCase
{
         for (int i = 0; i < numLedgers; i++) {
             LedgerHandle lh = bkc.createLedger(3, 3, DigestType.CRC32, "passwd".getBytes());
             lhs.add(lh);
-            for (int j = 0; j < 100; j++) {
+            for (int j = 0; j < 2; j++) {
                 lh.asyncAddEntry("testdata".getBytes(), new AddCallback() {
                         public void addComplete(int rc2, LedgerHandle lh, long entryId, Object
ctx) {
                             if (rc.compareAndSet(BKException.Code.OK, rc2)) {
@@ -295,18 +295,18 @@ public class AuditorPeriodicCheckTest extends BookKeeperClusterTestCase
{
     /**
      * Test that the period check will succeed if a ledger is deleted midway
      */
-    @Test(timeout=60000)
+    @Test(timeout=120000)
     public void testPeriodicCheckWhenLedgerDeleted() throws Exception {
         for (AuditorElector e : auditorElectors.values()) {
             e.shutdown();
         }
 
-        final int numLedgers = 100;
+        final int numLedgers = 10;
         List<Long> ids = new LinkedList<Long>();
         for (int i = 0; i < numLedgers; i++) {
             LedgerHandle lh = bkc.createLedger(3, 3, DigestType.CRC32, "passwd".getBytes());
             ids.add(lh.getId());
-            for (int j = 0; j < 10; j++) {
+            for (int j = 0; j < 2; j++) {
                 lh.addEntry("testdata".getBytes());
             }
             lh.close();


Mime
View raw message