geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sai_boorlaga...@apache.org
Subject incubator-geode git commit: removed swalloing exceptio on unsupported OS
Date Thu, 23 Jun 2016 17:51:43 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-1573 b006d993b -> d7cabe778


removed swalloing exceptio on unsupported OS


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

Branch: refs/heads/feature/GEODE-1573
Commit: d7cabe7785ae63baa650180fbf4ad51d25f8273f
Parents: b006d99
Author: Sai Boorlagadda <sboorlagadda@pivotal.io>
Authored: Thu Jun 23 10:51:28 2016 -0700
Committer: Sai Boorlagadda <sboorlagadda@pivotal.io>
Committed: Thu Jun 23 10:51:28 2016 -0700

----------------------------------------------------------------------
 .../CompressionCacheConfigDUnitTest.java        |  6 ---
 .../CompressionCacheListenerDUnitTest.java      | 20 +-------
 .../CompressionRegionConfigDUnitTest.java       | 48 +++-----------------
 .../CompressionRegionFactoryDUnitTest.java      |  8 +---
 .../CompressionRegionOperationsDUnitTest.java   | 41 ++---------------
 5 files changed, 11 insertions(+), 112 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d7cabe77/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
index a757c56..1dd07a1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
@@ -67,12 +67,6 @@ public class CompressionCacheConfigDUnitTest extends JUnit4CacheTestCase
{
    */
   @Test
   public void testCreateCacheWithGoodCompressor() throws Exception {
-    try {
-      SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) { // TODO: use junit Assume
-      // Not a supported OS
-      return;
-    }
     File cacheXml = createCacheXml(GOOD_COMPRESSOR);
     assertTrue(createCacheOnVM(getVM(0),cacheXml.getCanonicalPath()));
     assertCompressorOnVM(getVM(0),SnappyCompressor.getDefaultInstance(),REGION_NAME);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d7cabe77/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerDUnitTest.java
index f649d9a..1043859 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerDUnitTest.java
@@ -177,25 +177,13 @@ public class CompressionCacheListenerDUnitTest extends JUnit4CacheTestCase
{
   }
   
   protected void createRegion() {
-    try {
-      SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
     createCompressedRegionOnVm(getVM(TEST_VM), REGION_NAME, SnappyCompressor.getDefaultInstance());
   }
 
   @Override
   public final void preTearDownCacheTestCase() throws Exception {
     preTearDownCompressionCacheListenerDUnitTest();
-    
-    try {
-      SnappyCompressor.getDefaultInstance();
-      cleanup(getVM(TEST_VM));
-    } catch (Throwable t) {
-      // Not a supported OS
-    }
+    cleanup(getVM(TEST_VM));
   }
   
   protected void preTearDownCompressionCacheListenerDUnitTest() throws Exception {
@@ -251,12 +239,6 @@ public class CompressionCacheListenerDUnitTest extends JUnit4CacheTestCase
{
    * @param vm a virtual machine to perform the test on.
    */
   private void testCacheListenerAndWriterWithVM(final VM vm) {
-    try {
-      SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
     vm.invoke(new SerializableRunnable() {
       @Override
       public void run() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d7cabe77/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java
index 93c8c00..239e6d5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionConfigDUnitTest.java
@@ -86,13 +86,7 @@ public class CompressionRegionConfigDUnitTest extends JUnit4CacheTestCase
{
    */
   @Test
   public void testReplicateRegion() throws Exception {
-    Compressor compressor = null;
-    try {
-      compressor = SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
+    Compressor compressor = SnappyCompressor.getDefaultInstance();
     assertTrue(createCompressedRegionOnVm(getVM(0), REGION_NAME, DataPolicy.REPLICATE, compressor));
     assertTrue(createCompressedRegionOnVm(getVM(1), REGION_NAME, DataPolicy.REPLICATE, compressor));
     assertNull(putUsingVM(getVM(0),KEY_1,VALUE_1));
@@ -107,13 +101,7 @@ public class CompressionRegionConfigDUnitTest extends JUnit4CacheTestCase
{
    */
   @Test
   public void testReplicatePersistentRegion() throws Exception {
-    Compressor compressor = null;
-    try {
-      compressor = SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
+    Compressor compressor = SnappyCompressor.getDefaultInstance();
     assertTrue(createCompressedRegionOnVm(getVM(0), REGION_NAME, DataPolicy.PERSISTENT_REPLICATE,
compressor, DISK_STORE));
     assertTrue(createCompressedRegionOnVm(getVM(1), REGION_NAME, DataPolicy.PERSISTENT_REPLICATE,
compressor));
     assertNull(putUsingVM(getVM(0),KEY_1,VALUE_1));
@@ -130,13 +118,7 @@ public class CompressionRegionConfigDUnitTest extends JUnit4CacheTestCase
{
    */
   @Test
   public void testPartitionedRegion() {
-    Compressor compressor = null;
-    try {
-      compressor = SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
+    Compressor compressor = SnappyCompressor.getDefaultInstance();
     assertTrue(createCompressedRegionOnVm(getVM(0), REGION_NAME, DataPolicy.PARTITION, compressor));
     assertTrue(createCompressedRegionOnVm(getVM(1), REGION_NAME, DataPolicy.PARTITION, compressor));
     assertNull(putUsingVM(getVM(0),KEY_1,VALUE_1));
@@ -150,13 +132,7 @@ public class CompressionRegionConfigDUnitTest extends JUnit4CacheTestCase
{
    */
   @Test
   public void testPartitionedPersistentRegion() {
-    Compressor compressor = null;
-    try {
-      compressor = SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
+    Compressor compressor = SnappyCompressor.getDefaultInstance();
     assertTrue(createCompressedRegionOnVm(getVM(0), REGION_NAME, DataPolicy.PERSISTENT_PARTITION,
compressor, DISK_STORE));
     assertTrue(createCompressedRegionOnVm(getVM(1), REGION_NAME, DataPolicy.PERSISTENT_PARTITION,
compressor));
     assertNull(putUsingVM(getVM(0),KEY_1,VALUE_1));
@@ -173,13 +149,7 @@ public class CompressionRegionConfigDUnitTest extends JUnit4CacheTestCase
{
    */
   @Test
   public void testClientProxyRegion() {
-    Compressor compressor = null;
-    try {
-      compressor = SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
+    Compressor compressor = SnappyCompressor.getDefaultInstance();
     assertTrue(createCompressedServerRegionOnVm(getVM(0), REGION_NAME, DataPolicy.REPLICATE,
compressor));
     assertTrue(createCompressedClientRegionOnVm(getVM(1), REGION_NAME, compressor, ClientRegionShortcut.PROXY));
     assertNull(putUsingClientVM(getVM(1),KEY_1,VALUE_1));
@@ -194,13 +164,7 @@ public class CompressionRegionConfigDUnitTest extends JUnit4CacheTestCase
{
    */
   @Test
   public void testCachingClientProxyRegion() {
-    Compressor compressor = null;
-    try {
-      compressor = SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
+    Compressor compressor = SnappyCompressor.getDefaultInstance();
     assertTrue(createCompressedServerRegionOnVm(getVM(0), REGION_NAME, DataPolicy.REPLICATE,
compressor));
     assertTrue(createCompressedClientRegionOnVm(getVM(1), REGION_NAME, compressor, ClientRegionShortcut.CACHING_PROXY));
     assertNull(putUsingClientVM(getVM(1),KEY_1,VALUE_1));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d7cabe77/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionFactoryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionFactoryDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionFactoryDUnitTest.java
index 43f7d23..f5a7e8c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionFactoryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionFactoryDUnitTest.java
@@ -69,13 +69,7 @@ public class CompressionRegionFactoryDUnitTest extends JUnit4CacheTestCase
{
    */
   @Test
   public void testRegionFactoryCompressor() {
-    Compressor compressor = null;
-    try {
-      compressor = SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
+    Compressor compressor = SnappyCompressor.getDefaultInstance();
     assertTrue(createCompressedRegionOnVm(getVM(TEST_VM), COMPRESSED_REGION_NAME, compressor));
     assertCompressor(getVM(TEST_VM), COMPRESSED_REGION_NAME, compressor);
     cleanup(getVM(TEST_VM));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d7cabe77/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsDUnitTest.java
index 1f56859..9072cdc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsDUnitTest.java
@@ -131,13 +131,7 @@ public class CompressionRegionOperationsDUnitTest extends JUnit4CacheTestCase
{
   }
   
   protected void createRegion() {
-    Compressor compressor = null;
-    try {
-      compressor = SnappyCompressor.getDefaultInstance();;
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
+    Compressor compressor = SnappyCompressor.getDefaultInstance();;
     createCompressedRegionOnVm(getVM(TEST_VM), REGION_NAME, compressor);
   }
   
@@ -153,13 +147,8 @@ public class CompressionRegionOperationsDUnitTest extends JUnit4CacheTestCase
{
     } catch (Exception e) {
       exception = e;
     }
-    
-    try {
-      SnappyCompressor.getDefaultInstance();
-      cleanup(getVM(TEST_VM));
-    } catch (Throwable t) {
-      // Not a supported OS
-    }
+
+    cleanup(getVM(TEST_VM));
     
     if (error != null) {
       throw error;
@@ -194,12 +183,6 @@ public class CompressionRegionOperationsDUnitTest extends JUnit4CacheTestCase
{
    * @param vm a test virtual machine.
    */
   private void testGetPutOperationsOnVM(final VM vm) {
-    try {
-      SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
     vm.invoke(new SerializableRunnable() {
       @Override
       public void run() {
@@ -267,12 +250,6 @@ public class CompressionRegionOperationsDUnitTest extends JUnit4CacheTestCase
{
    * @param vm a test virtual machine.
    */
   private void testKeysAndValuesOperationsOnVM(final VM vm) {
-    try {
-      SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
     vm.invoke(new SerializableRunnable() {        
       @Override
       public void run() {
@@ -354,12 +331,6 @@ public class CompressionRegionOperationsDUnitTest extends JUnit4CacheTestCase
{
    * @param vm a test virtual machine.
    */
   private void testGetPutOperationsWithCachedDeserializableOnVM(final VM vm) {
-    try {
-      SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
     vm.invoke(new SerializableRunnable() {
       @Override
       public void run() {
@@ -424,12 +395,6 @@ public class CompressionRegionOperationsDUnitTest extends JUnit4CacheTestCase
{
    * @param vm a test virtual machine.
    */
   private void testGetPutOperationsWithByteArraysOnVM(final VM vm) {
-    try {
-      SnappyCompressor.getDefaultInstance();
-    } catch (Throwable t) {
-      // Not a supported OS
-      return;
-    }
     vm.invoke(new SerializableRunnable() {
       @Override
       public void run() {


Mime
View raw message