You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2018/03/29 17:18:01 UTC

[geode] branch develop updated: GEODE-4969 PDX Type registry throws CacheClosedException causing random test failures

This is an automated email from the ASF dual-hosted git repository.

bschuchardt pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 3baccb4  GEODE-4969 PDX Type registry throws CacheClosedException causing random test failures
3baccb4 is described below

commit 3baccb4d1c453feb5d58784e2d7a157db2bf5af2
Author: Bruce Schuchardt <bs...@pivotal.io>
AuthorDate: Thu Mar 29 10:17:03 2018 -0700

    GEODE-4969 PDX Type registry throws CacheClosedException causing random test failures
    
    bullet proofing yet another test against this TypeRegistry problem
---
 .../org/apache/geode/internal/HeapDataOutputStreamJUnitTest.java  | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/geode-core/src/test/java/org/apache/geode/internal/HeapDataOutputStreamJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/HeapDataOutputStreamJUnitTest.java
index 076167e..3f1d046 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/HeapDataOutputStreamJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/HeapDataOutputStreamJUnitTest.java
@@ -21,11 +21,13 @@ import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.DataSerializer;
 import org.apache.geode.internal.cache.UnitTestValueHolder;
+import org.apache.geode.pdx.internal.TypeRegistry;
 import org.apache.geode.test.junit.categories.UnitTest;
 
 /**
@@ -37,6 +39,12 @@ import org.apache.geode.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class HeapDataOutputStreamJUnitTest {
 
+  @Before
+  public void setup() {
+    // ensure no bleedthrough from other tests
+    TypeRegistry.init();
+  }
+
   @Test
   public void testWriteByteBuffer() {
     HeapDataOutputStream out = new HeapDataOutputStream(64, Version.CURRENT);

-- 
To stop receiving notification emails like this one, please contact
bschuchardt@apache.org.