bookkeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject [2/2] bookkeeper git commit: BOOKKEEPER-839: AuditorPeriodicCheckTest timeout (rakeshr via sijie)
Date Thu, 12 Mar 2015 07:25:21 GMT
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/ee02679b
Tree: http://git-wip-us.apache.org/repos/asf/bookkeeper/tree/ee02679b
Diff: http://git-wip-us.apache.org/repos/asf/bookkeeper/diff/ee02679b

Branch: refs/heads/branch-4.3
Commit: ee02679b3a5716459ec7b686174b542f2fbf981b
Parents: 3479802
Author: Sijie Guo <sijie@apache.org>
Authored: Thu Mar 12 00:24:50 2015 -0700
Committer: Sijie Guo <sijie@apache.org>
Committed: Thu Mar 12 00:24:50 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/ee02679b/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 72670ae..a645586 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -20,6 +20,8 @@ Release 4.3.1 - unreleased
 
       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/ee02679b/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