You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2019/01/14 22:51:47 UTC
[geode] branch feature/GEODE-6272 updated: added unit test for
fields in different order
This is an automated email from the ASF dual-hosted git repository.
dschneider pushed a commit to branch feature/GEODE-6272
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/feature/GEODE-6272 by this push:
new f64605b added unit test for fields in different order
f64605b is described below
commit f64605ba0d165a172b357d368850e05fa7a754de
Author: Darrel Schneider <ds...@pivotal.io>
AuthorDate: Mon Jan 14 14:51:12 2019 -0800
added unit test for fields in different order
---
.../org/apache/geode/pdx/PdxInstanceFactoryJUnitTest.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/pdx/PdxInstanceFactoryJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/pdx/PdxInstanceFactoryJUnitTest.java
index 07f1874..51be526 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/pdx/PdxInstanceFactoryJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/pdx/PdxInstanceFactoryJUnitTest.java
@@ -1298,6 +1298,20 @@ public class PdxInstanceFactoryJUnitTest {
}
@Test
+ public void stablePdxInstanceWithMultipleEqualFieldsInDifferentOrderAreEqual() {
+ PdxInstanceFactory factory = cache.createStablePdxInstanceFactory("myPdxInstanceType");
+ factory.writeString("fieldOne", "valueOne");
+ factory.writeString("fieldTwo", "valueTwo");
+ PdxInstance instance = factory.create();
+ factory = cache.createStablePdxInstanceFactory("myPdxInstanceType");
+ factory.writeString("fieldTwo", "valueTwo");
+ factory.writeString("fieldOne", "valueOne");
+ PdxInstance instance2 = factory.create();
+
+ assertThat(instance).isEqualTo(instance2);
+ }
+
+ @Test
public void normalPdxInstanceAddedToRegionWithPdxReadSerializedFalseAndABadClassThrowsClassNotFoundWhenRegionGet() {
// make sure the cache has pdx-read-serialized set to false
this.cache.close();