Skip to content

Commit 059d491

Browse files
committed
test: Moved JSON.MERGE test to just stack
1 parent f0b5974 commit 059d491

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

subprojects/lettucemod/src/test/java/com/redis/lettucemod/ModulesTests.java

-10
Original file line numberDiff line numberDiff line change
@@ -288,16 +288,6 @@ void jsonMget() throws JsonProcessingException {
288288
assertJSONEquals(json3, results.get(2).getValue());
289289
}
290290

291-
@Test
292-
void jsonMerge() throws JsonProcessingException {
293-
String key = "jsonMerge:test";
294-
connection.sync().del(key);
295-
connection.sync().jsonSet(key, "$", "{\"a\":2, \"b\": 3, \"nested\": {\"a\": 4}}");
296-
connection.sync().jsonMerge(key, "$", "{\"a\": 4, \"c\": 5, \"nested\": {\"b\": 6}}");
297-
assertJSONEquals("[{\"a\":4,\"b\":3,\"nested\":{\"a\":4,\"b\":6},\"c\":5}]",
298-
connection.sync().jsonGet(key, "$"));
299-
}
300-
301291
@Test
302292
void jsonMgetReactive() throws JsonProcessingException {
303293
String key1 = "obj1";

subprojects/lettucemod/src/test/java/com/redis/lettucemod/StackTests.java

+10
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ class StackTests extends ModulesTests {
4545
protected AbstractRedisContainer<?> getRedisContainer() {
4646
return container;
4747
}
48+
49+
@Test
50+
void jsonMerge() throws JsonProcessingException {
51+
String key = "jsonMerge:test";
52+
connection.sync().del(key);
53+
connection.sync().jsonSet(key, "$", "{\"a\":2, \"b\": 3, \"nested\": {\"a\": 4}}");
54+
connection.sync().jsonMerge(key, "$", "{\"a\": 4, \"c\": 5, \"nested\": {\"b\": 6}}");
55+
assertJSONEquals("[{\"a\":4,\"b\":3,\"nested\":{\"a\":4,\"b\":6},\"c\":5}]",
56+
connection.sync().jsonGet(key, "$"));
57+
}
4858

4959
@Test
5060
void getPath() throws JsonProcessingException {

0 commit comments

Comments
 (0)