|
37 | 37 | import glide.api.models.commands.geospatial.GeoUnit;
|
38 | 38 | import glide.api.models.commands.geospatial.GeospatialData;
|
39 | 39 | import glide.api.models.commands.stream.StreamAddOptions;
|
| 40 | +import glide.api.models.commands.stream.StreamClaimOptions; |
40 | 41 | import glide.api.models.commands.stream.StreamGroupOptions;
|
41 | 42 | import glide.api.models.commands.stream.StreamRange;
|
42 | 43 | import glide.api.models.commands.stream.StreamRange.IdBound;
|
@@ -66,29 +67,37 @@ public interface TransactionBuilder extends Function<BaseTransaction<?>, Object[
|
66 | 67 | /** Generate test samples for parametrized tests. Could be routed to random node. */
|
67 | 68 | public static Stream<Arguments> getCommonTransactionBuilders() {
|
68 | 69 | return Stream.of(
|
| 70 | + // Arguments.of( |
| 71 | + // "Generic Commands", (TransactionBuilder) |
| 72 | + // TransactionTestUtilities::genericCommands), |
| 73 | + // Arguments.of( |
| 74 | + // "String Commands", (TransactionBuilder) |
| 75 | + // TransactionTestUtilities::stringCommands), |
| 76 | + // Arguments.of("Hash Commands", (TransactionBuilder) |
| 77 | + // TransactionTestUtilities::hashCommands), |
| 78 | + // Arguments.of("List Commands", (TransactionBuilder) |
| 79 | + // TransactionTestUtilities::listCommands), |
| 80 | + // Arguments.of("Set Commands", (TransactionBuilder) |
| 81 | + // TransactionTestUtilities::setCommands), |
| 82 | + // Arguments.of( |
| 83 | + // "Sorted Set Commands", |
| 84 | + // (TransactionBuilder) TransactionTestUtilities::sortedSetCommands), |
| 85 | + // Arguments.of( |
| 86 | + // "HyperLogLog Commands", |
| 87 | + // (TransactionBuilder) |
| 88 | + // TransactionTestUtilities::hyperLogLogCommands), |
69 | 89 | Arguments.of(
|
70 |
| - "Generic Commands", (TransactionBuilder) TransactionTestUtilities::genericCommands), |
71 |
| - Arguments.of( |
72 |
| - "String Commands", (TransactionBuilder) TransactionTestUtilities::stringCommands), |
73 |
| - Arguments.of("Hash Commands", (TransactionBuilder) TransactionTestUtilities::hashCommands), |
74 |
| - Arguments.of("List Commands", (TransactionBuilder) TransactionTestUtilities::listCommands), |
75 |
| - Arguments.of("Set Commands", (TransactionBuilder) TransactionTestUtilities::setCommands), |
76 |
| - Arguments.of( |
77 |
| - "Sorted Set Commands", |
78 |
| - (TransactionBuilder) TransactionTestUtilities::sortedSetCommands), |
79 |
| - Arguments.of( |
80 |
| - "HyperLogLog Commands", |
81 |
| - (TransactionBuilder) TransactionTestUtilities::hyperLogLogCommands), |
82 |
| - Arguments.of( |
83 |
| - "Stream Commands", (TransactionBuilder) TransactionTestUtilities::streamCommands), |
84 |
| - Arguments.of( |
85 |
| - "Connection Management Commands", |
86 |
| - (TransactionBuilder) TransactionTestUtilities::connectionManagementCommands), |
87 |
| - Arguments.of( |
88 |
| - "Geospatial Commands", |
89 |
| - (TransactionBuilder) TransactionTestUtilities::geospatialCommands), |
90 |
| - Arguments.of( |
91 |
| - "Bitmap Commands", (TransactionBuilder) TransactionTestUtilities::bitmapCommands)); |
| 90 | + "Stream Commands", (TransactionBuilder) TransactionTestUtilities::streamCommands)); |
| 91 | + // Arguments.of( |
| 92 | + // "Connection Management Commands", |
| 93 | + // (TransactionBuilder) |
| 94 | + // TransactionTestUtilities::connectionManagementCommands), |
| 95 | + // Arguments.of( |
| 96 | + // "Geospatial Commands", |
| 97 | + // (TransactionBuilder) TransactionTestUtilities::geospatialCommands), |
| 98 | + // Arguments.of( |
| 99 | + // "Bitmap Commands", (TransactionBuilder) |
| 100 | + // TransactionTestUtilities::bitmapCommands)); |
92 | 101 | }
|
93 | 102 |
|
94 | 103 | /** Generate test samples for parametrized tests. Could be routed to primary nodes only. */
|
@@ -805,6 +814,22 @@ private static Object[] streamCommands(BaseTransaction<?> transaction) {
|
805 | 814 | groupName1,
|
806 | 815 | consumer1,
|
807 | 816 | StreamReadGroupOptions.builder().count(2L).build())
|
| 817 | + .xclaim(streamKey1, groupName1, consumer1, 0L, new String[] {"0-1"}) |
| 818 | + .xclaim( |
| 819 | + streamKey1, |
| 820 | + groupName1, |
| 821 | + consumer1, |
| 822 | + 0L, |
| 823 | + new String[] {"0-3"}, |
| 824 | + StreamClaimOptions.builder().force().build()) |
| 825 | + .xclaimJustId(streamKey1, groupName1, consumer1, 0L, new String[] {"0-3"}) |
| 826 | + .xclaimJustId( |
| 827 | + streamKey1, |
| 828 | + groupName1, |
| 829 | + consumer1, |
| 830 | + 0L, |
| 831 | + new String[] {"0-4"}, |
| 832 | + StreamClaimOptions.builder().force().build()) |
808 | 833 | .xpending(streamKey1, groupName1)
|
809 | 834 | .xack(streamKey1, groupName1, new String[] {"0-3"})
|
810 | 835 | .xpending(
|
@@ -850,6 +875,17 @@ private static Object[] streamCommands(BaseTransaction<?> transaction) {
|
850 | 875 | Map.of(
|
851 | 876 | streamKey1,
|
852 | 877 | Map.of()), // xreadgroup(Map.of(streamKey1, ">"), groupName1, consumer1, options);
|
| 878 | + Map.of(), // xclaim(streamKey1, groupName1, consumer1, 0L, new String[] {"0-1"}) |
| 879 | + Map.of( |
| 880 | + "0-3", |
| 881 | + new String[] { |
| 882 | + "field3", "value3" |
| 883 | + }), // xclaim(streamKey1, groupName1, consumer1, 0L, {"0-3"}, options) |
| 884 | + new String[] { |
| 885 | + "0-3" |
| 886 | + }, // xclaimJustId(streamKey1, groupName1, consumer1, 0L, new String[] {"0-3"}) |
| 887 | + new String |
| 888 | + [0], // xclaimJustId(streamKey1, groupName1, consumer1, 0L, new String[] {"0-4"}, options) |
853 | 889 | new Object[] {
|
854 | 890 | 1L, "0-3", "0-3", new Object[][] {{consumer1, "1"}}
|
855 | 891 | }, // xpending(streamKey1, groupName1)
|
|
0 commit comments