geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [25/47] incubator-geode git commit: GEODE-731: fix suspect string in CompressionCacheConfigDUnitTest
Date Fri, 08 Jan 2016 18:42:26 GMT
GEODE-731: fix suspect string in CompressionCacheConfigDUnitTest


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

Branch: refs/heads/feature/GEODE-714
Commit: fb38186b142b4d10bdeb069b6255dac1cd2d9bc6
Parents: f36310d
Author: Swapnil Bawaskar <sbawaskar@pivotal.io>
Authored: Wed Jan 6 09:46:48 2016 -0800
Committer: Swapnil Bawaskar <sbawaskar@pivotal.io>
Committed: Wed Jan 6 09:48:19 2016 -0800

----------------------------------------------------------------------
 .../compression/CompressionCacheConfigDUnitTest.java  | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fb38186b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
index 9f01ef8..9eb51c5 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
@@ -27,10 +27,7 @@ import com.gemstone.gemfire.compression.Compressor;
 import com.gemstone.gemfire.compression.SnappyCompressor;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import dunit.*;
 
 /**
  * Tests configured and badly configured cache.xml files with regards to compression.
@@ -97,8 +94,13 @@ public class CompressionCacheConfigDUnitTest extends CacheTestCase {
    */
   public void testCreateCacheWithBadCompressor() throws Exception {
     File cacheXml = createCacheXml(BAD_COMPRESSOR);
-    assertFalse(createCacheOnVM(getVM(0),cacheXml.getCanonicalPath()));
-    cacheXml.delete();
+    ExpectedException expectedException = DistributedTestCase.addExpectedException("While
reading Cache XML file");
+    try {
+      assertFalse(createCacheOnVM(getVM(0), cacheXml.getCanonicalPath()));
+    } finally {
+      expectedException.remove();
+      cacheXml.delete();
+    }
   }
   
   /**


Mime
View raw message