Skip to content

Commit

Permalink
fix TransactionTestUtilities
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesx-improving committed Jul 5, 2024
1 parent 39b2105 commit 1a4f597
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions java/integTest/src/test/java/glide/TransactionTestUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -866,12 +866,6 @@ private static Object[] streamCommands(BaseTransaction<?> transaction) {
transaction
.xautoclaim(streamKey1, groupName1, consumer1, 0L, "0-0")
.xautoclaimJustId(streamKey1, groupName1, consumer1, 0L, "0-0");

if (REDIS_VERSION.isGreaterThanOrEqualTo("7.0.0")) {
transaction
.xautoclaim(streamKey1, groupName1, consumer1, 0L, "0-0")
.xautoclaimJustId(streamKey1, groupName1, consumer1, 0L, "0-0");
}
}

transaction
Expand Down Expand Up @@ -946,25 +940,32 @@ private static Object[] streamCommands(BaseTransaction<?> transaction) {
1L, "0-3", "0-3", new Object[][] {{consumer1, "1"}} // xpending(streamKey1, groupName1)
}
};
if (REDIS_VERSION.isGreaterThanOrEqualTo("6.2.0")) {
if (REDIS_VERSION.isGreaterThanOrEqualTo("7.0.0")) {
result =
concatenateArrays(
result,
new Object[] {
Map.of("0-1", Map.of("0-3", new String[][] {{"field3", "value3"}})),
"0-1", "0-3"
} // xautoclaimJustId(streamKey1, groupName1, consumer1, 0L, "0-0");
);
} else if (REDIS_VERSION.isGreaterThanOrEqualTo("7.0.0")) {
concatenateArrays(
result,
new Object[] {
new Object[]{
"0-0",
Map.of("0-3", new String[][]{{"field3", "value3"}}),
new Object[]{}
}, // xautoclaim(streamKey1, groupName1, consumer1, 0L, "0-0")
new Object[] {"0-0", new String[]{"0-3"}, new Object[] {} } // xautoclaimJustId(streamKey1, groupName1, consumer1, 0L, "0-0");
}
);
}
else if (REDIS_VERSION.isGreaterThanOrEqualTo("6.2.0")) {
result =
concatenateArrays(
result,
new Object[] {
"0-0", Map.of("0-3", new String[][] {{"field3", "value3"}, new String[] {}})
, // xautoclaim(streamKey1, groupName1, consumer1, 0L, "0-0")
"0-1", "0-3", new String[] {}
} // xautoclaimJustId(streamKey1, groupName1, consumer1, 0L, "0-0");
);
concatenateArrays(
result,
new Object[] {
new Object[] {
"0-0",
Map.of("0-3", new String[][] {{"field3", "value3"}})
},// xautoclaim(streamKey1, groupName1, consumer1, 0L, "0-0")
new Object[] {"0-0", new String[]{"0-3"}}// xautoclaimJustId(streamKey1, groupName1, consumer1, 0L, "0-0");
}
);
}
result =
concatenateArrays(
Expand Down

0 comments on commit 1a4f597

Please sign in to comment.