diff options
Diffstat (limited to 'test/java/junit/src/com/sleepycat/db/test/RepmgrStartupTest.java')
-rw-r--r-- | test/java/junit/src/com/sleepycat/db/test/RepmgrStartupTest.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/java/junit/src/com/sleepycat/db/test/RepmgrStartupTest.java b/test/java/junit/src/com/sleepycat/db/test/RepmgrStartupTest.java index 2897752e..f2014d33 100644 --- a/test/java/junit/src/com/sleepycat/db/test/RepmgrStartupTest.java +++ b/test/java/junit/src/com/sleepycat/db/test/RepmgrStartupTest.java @@ -1,7 +1,7 @@ /*- * See the file LICENSE for redistribution information. * - * Copyright (c) 2002, 2012 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved. * */ @@ -117,6 +117,21 @@ public class RepmgrStartupTest extends EventHandlerAdapter try { // start replication manager dbenv.replicationManagerStart(3, ReplicationManagerStartPolicy.REP_MASTER); + EnvironmentConfig cfg = dbenv.getConfig(); + assertEquals(cfg.getReplicationManagerIncomingQueueMax(), 100L * 1024L * 1024L); + long gigabyte = 1024L * 1024L * 1024L; + long megabyte = 1024L * 1024L; + // Test setting repmgr incoming queue size > 1GB. + cfg.setReplicationManagerIncomingQueueMax(123456L * gigabyte + 654321L); + dbenv.setConfig(cfg); + cfg = dbenv.getConfig(); + assertEquals(cfg.getReplicationManagerIncomingQueueMax(), 123456L * gigabyte + 654321L); + // Test setting repmgr incoming queue size < 1GB. + cfg.setReplicationManagerIncomingQueueMax(10L * megabyte); + dbenv.setConfig(cfg); + cfg = dbenv.getConfig(); + assertEquals(cfg.getReplicationManagerIncomingQueueMax(), 10L * megabyte); + } catch(DatabaseException dbe) { fail("Unexpected database exception came from replicationManagerStart." + dbe); } |