You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2022/02/01 08:06:27 UTC
[ignite] branch master updated: IGNITE-12276 Thin client uses Optimized marshaller for TreeSet and TreeMap
This is an automated email from the ASF dual-hosted git repository.
ptupitsyn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 1b8cab4 IGNITE-12276 Thin client uses Optimized marshaller for TreeSet and TreeMap
1b8cab4 is described below
commit 1b8cab457de062707e98db6eaabe1e156324df43
Author: Pavel Tupitsyn <pt...@apache.org>
AuthorDate: Tue Feb 1 11:06:01 2022 +0300
IGNITE-12276 Thin client uses Optimized marshaller for TreeSet and TreeMap
---
.../ignite/internal/client/thin/ServicesTest.java | 29 +++++++++++++++++++---
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/client/thin/ServicesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/client/thin/ServicesTest.java
index ee670a1..5ba0662 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/client/thin/ServicesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/client/thin/ServicesTest.java
@@ -17,14 +17,21 @@
package org.apache.ignite.internal.client.thin;
+import static org.apache.ignite.IgniteSystemProperties.IGNITE_USE_BINARY_ARRAYS;
+import static org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause;
+import static org.junit.Assert.assertArrayEquals;
+
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
+import java.util.TreeSet;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.client.ClientCache;
import org.apache.ignite.client.ClientClusterGroup;
import org.apache.ignite.client.ClientException;
import org.apache.ignite.client.ClientServiceDescriptor;
@@ -42,10 +49,6 @@ import org.apache.ignite.services.ServiceContext;
import org.apache.ignite.testframework.GridTestUtils;
import org.junit.Test;
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_USE_BINARY_ARRAYS;
-import static org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause;
-import static org.junit.Assert.assertArrayEquals;
-
/**
* Checks service invocation for thin client.
*/
@@ -115,6 +118,24 @@ public class ServicesTest extends AbstractThinClientTest {
}
}
+ @Test
+ public void testTreeSetMapRoundtrip() {
+ try (IgniteClient client = startClient(0)) {
+ TreeSet<Object> treeSet = new TreeSet<>();
+
+ ClientCache<Object, Object> clientCache = client.cache(DEFAULT_CACHE_NAME);
+ IgniteCache<Object, Object> serverCache = grid().cache(DEFAULT_CACHE_NAME);
+
+ clientCache.put(1, treeSet);
+ serverCache.put(2, treeSet);
+
+ Object res1 = clientCache.get(2);
+ Object res2 = serverCache.get(1);
+
+ assertEquals(res1.getClass(), res2.getClass());
+ }
+ }
+
/**
* @param svc Service.
*/