geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [4/4] incubator-geode git commit: Add missing @Test and other test cleanup
Date Tue, 26 Apr 2016 23:44:11 GMT
Add missing @Test and other test cleanup


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

Branch: refs/heads/feature/GEODE-1276
Commit: a4008236cb3f77b69ee8739d1f86ae87c99fcf2b
Parents: 4f6ca83
Author: Kirk Lund <klund@apache.org>
Authored: Tue Apr 26 16:43:47 2016 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Tue Apr 26 16:43:47 2016 -0700

----------------------------------------------------------------------
 .../ParallelGatewaySenderQueueJUnitTest.java        |  3 ---
 ...tSerialGatewaySenderEventProcessorJUnitTest.java | 16 ++++++++++++----
 .../cache/xmlcache/AbstractXmlParserJUnitTest.java  |  2 +-
 3 files changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a4008236/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java
index c85be1e..0e4d193 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueJUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.cache.wan.parallel;
 import static org.junit.Assert.*;
 import static org.mockito.Mockito.*;
 
-import java.io.IOException;
 import java.util.Collections;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
@@ -30,8 +29,6 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.CancelCriterion;
 import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.RegionExistsException;
-import com.gemstone.gemfire.cache.TimeoutException;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a4008236/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/ConcurrentSerialGatewaySenderEventProcessorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/ConcurrentSerialGatewaySenderEventProcessorJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/ConcurrentSerialGatewaySenderEventProcessorJUnitTest.java
index e26d287..37962e9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/ConcurrentSerialGatewaySenderEventProcessorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/ConcurrentSerialGatewaySenderEventProcessorJUnitTest.java
@@ -19,6 +19,7 @@ package com.gemstone.gemfire.internal.cache.wan.serial;
 import static org.junit.Assert.*;
 import static org.mockito.Mockito.*;
 
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -29,12 +30,19 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class ConcurrentSerialGatewaySenderEventProcessorJUnitTest {
 
-  @Test
-  public void eventQueueSizeReturnsSizeOfQueues() {
+  private ConcurrentSerialGatewaySenderEventProcessor processor;
+  private RegionQueue queue;
+
+  @Before
+  public void setUp() throws Exception {
     AbstractGatewaySender sender = mock(AbstractGatewaySender.class);
-    ConcurrentSerialGatewaySenderEventProcessor processor = new ConcurrentSerialGatewaySenderEventProcessor(sender);
-    RegionQueue queue = mock(RegionQueue.class);
+    processor = new ConcurrentSerialGatewaySenderEventProcessor(sender);
+    queue = mock(RegionQueue.class);
     when(queue.size()).thenReturn(3);
+  }
+
+  @Test
+  public void eventQueueSizeReturnsSizeOfQueues() {
     processor.getQueues().add(queue);
     assertEquals(3,processor.eventQueueSize());
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a4008236/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractXmlParserJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractXmlParserJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractXmlParserJUnitTest.java
index 8e9e2a4..104a706 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractXmlParserJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/AbstractXmlParserJUnitTest.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.internal.cache.xmlcache;
 
 import static org.junit.Assert.*;
@@ -51,6 +50,7 @@ public class AbstractXmlParserJUnitTest {
   /**
    * Test method for {@link AbstractXmlParser#setDocumentLocator(Locator)}.
    */
+  @Test
   public void testSetDocumentLocator() {
     final MockXmlParser mockXmlParser = new MockXmlParser();
     final Locator mockLocator = new Locator() {


Mime
View raw message