Skip to content

Commit

Permalink
Update type() IT with XADD
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Carbonetto <[email protected]>
  • Loading branch information
acarbonetto committed Apr 3, 2024
1 parent dde970a commit 38f5a74
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions java/integTest/src/test/java/glide/SharedCommandTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -1260,16 +1260,8 @@ public void type(BaseClient client) {
assertEquals(1, client.lpush(listKey, new String[] {"value"}).get());
assertEquals(1, client.hset(hashKey, Map.of("1", "2")).get());
assertEquals(1, client.sadd(setKey, new String[] {"value"}).get());
assertEquals(1, client.zadd(zsetKey, Map.of("1", 2.)).get());

// TODO: update after adding XADD
// use custom command until XADD is implemented
String[] args = new String[] {"XADD", streamKey, "*", "field", "value"};
if (client instanceof RedisClient) {
assertNotNull(((RedisClient) client).customCommand(args).get());
} else if (client instanceof RedisClusterClient) {
assertNotNull(((RedisClusterClient) client).customCommand(args).get().getSingleValue());
}
assertEquals(1, client.zadd(zsetKey, Map.of("1", 2d)).get());
assertNotNull(client.xadd(streamKey, Map.of("field", "value")));

assertTrue("none".equalsIgnoreCase(client.type(nonExistingKey).get()));
assertTrue("string".equalsIgnoreCase(client.type(stringKey).get()));
Expand Down

0 comments on commit 38f5a74

Please sign in to comment.