GEODE-1111 Connection Pooling needs more tests These tests were dependent on an Order class that is only available in Pivotal's old test framework. I've created a small Order class that replaces it and allows the tests to run as part of Geode's geode-core distributedTest task.
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/4ed2fd37 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/4ed2fd37 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/4ed2fd37 Branch: refs/heads/feature/GEODE-17-2 Commit: 4ed2fd374cf27ff704b09600eef263b71be9eabc Parents: ac3d3b4 Author: Bruce Schuchardt <[email protected]> Authored: Thu Mar 17 15:04:59 2016 -0700 Committer: Bruce Schuchardt <[email protected]> Committed: Thu Mar 17 15:10:10 2016 -0700 ---------------------------------------------------------------------- .../cache/ConnectionPoolAutoDUnitTest.java | 45 + .../gemfire/cache/ConnectionPoolDUnitTest.java | 5871 ++++++++++++++++++ 2 files changed, 5916 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4ed2fd37/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java new file mode 100755 index 0000000..ad110d7 --- /dev/null +++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java @@ -0,0 +1,45 @@ +/*========================================================================= + * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. + * This product is protected by U.S. and international copyright + * and intellectual property laws. Pivotal products are covered by + * one or more patents listed at http://www.pivotal.io/patents. + *========================================================================= + */ +package com.gemstone.gemfire.cache; + +import com.gemstone.gemfire.cache30.ClientServerTestCase; +import com.gemstone.gemfire.test.dunit.Invoke; +import com.gemstone.gemfire.test.dunit.SerializableRunnable; + +import static org.junit.runners.MethodSorters.*; +import org.junit.FixMethodOrder; + +@FixMethodOrder(NAME_ASCENDING) +public class ConnectionPoolAutoDUnitTest extends ConnectionPoolDUnitTest { + + public ConnectionPoolAutoDUnitTest(String name) { + super(name); + } + + public void setUp() throws Exception { + super.setUp(); + // TODO Auto-generated method stub + ClientServerTestCase.AUTO_LOAD_BALANCE = true; + Invoke.invokeInEveryVM(new SerializableRunnable("setupAutoMode") { + public void run() { + ClientServerTestCase.AUTO_LOAD_BALANCE = true; + } + }); + } + + @Override + protected final void postTearDownConnectionPoolDUnitTest() throws Exception { + ClientServerTestCase.AUTO_LOAD_BALANCE = false; + Invoke.invokeInEveryVM(new SerializableRunnable("disableAutoMode") { + public void run() { + ClientServerTestCase.AUTO_LOAD_BALANCE = false; + } + }); + } + +}
