Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dengliming authored and Liming Deng committed Mar 10, 2024
1 parent b8a1619 commit 09718d7
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 56 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
build:
runs-on: ubuntu-latest
services:
redismod:
image: redislabs/redismod:edge
redis-stack-server:
image: redis/redis-stack-server:edge
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
Expand All @@ -30,6 +30,24 @@ jobs:
--health-retries 5
ports:
- 52568:6379
redisgears:
image: redislabs/redisgears:latest
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6383:6379
redisgraph:
image: redislabs/redisgraph:edge
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6384:6379
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
Expand All @@ -44,5 +62,5 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn clean install -DREDIS_HOST=localhost -DREDIS_PORT=52567 -DREDISAI_PORT=52568 -Dgpg.skip --file pom.xml
run: mvn clean install -DREDIS_HOST=localhost -DREDIS_PORT=52567 -DREDISAI_PORT=52568 -DREDIS_GEARS_PORT=6383 -DREDIS_GRAPH_PORT=6384 -Dgpg.skip --file pom.xml
- uses: codecov/codecov-action@v1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 dengliming.
* Copyright 2022-2024 dengliming.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,9 @@
import org.redisson.client.codec.StringCodec;
import org.redisson.client.protocol.RedisCommand;
import org.redisson.client.protocol.decoder.ListMultiDecoder2;
import org.redisson.client.protocol.decoder.MapKeyDecoder;
import org.redisson.client.protocol.decoder.ObjectListReplayDecoder;
import org.redisson.client.protocol.decoder.ObjectSetReplayDecoder;
import org.redisson.client.protocol.decoder.StringListReplayDecoder;
import org.redisson.command.CommandAsyncExecutor;

Expand All @@ -28,12 +30,11 @@

public class RedisConditions {

private static final RedisCommand COMMAND = new RedisCommand<>("COMMAND",
new ListMultiDecoder2<>(new RedisConditionsDecoder(), new ObjectListReplayDecoder<>(),
new StringListReplayDecoder()));
private static final RedisCommand COMMAND = new RedisCommand<>("COMMAND", "LIST",
new MapKeyDecoder(new ObjectSetReplayDecoder()));

private static final RedisCommand MODULE_LIST = new RedisCommand<>("MODULE", "LIST",
new ListMultiDecoder2<>(new ModuleListDecoder(), new ObjectListReplayDecoder<>()));
new ListMultiDecoder2<>(new ModuleListDecoder(), new ObjectListReplayDecoder<>(), new StringListReplayDecoder()));

private final Set<String> commands;

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public List<String> list() {
}

public RFuture<List<String>> listAsync() {
return commandExecutor.readAsync(getName(), codec, TOPK_LIST, getName());
return commandExecutor.readAsync(getName(), StringCodec.INSTANCE, TOPK_LIST, getName());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ public Map<String, String> getConfig(ConfigOption option) {
public RFuture<Map<String, String>> getConfigAsync(ConfigOption option) {
RAssert.notNull(option, "ConfigOption must be not null");

return commandExecutor.readAsync(getName(), codec, FT_CONFIG_GET, option.getKeyword());
return commandExecutor.readAsync(getName(), StringCodec.INSTANCE, FT_CONFIG_GET, option.getKeyword());
}

public Map<String, String> getHelp(ConfigOption option) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public abstract class AbstractTest {
@BeforeEach
public void init() {
Config config = new Config();
config.useSingleServer().setAddress("redis://" + TestSettings.host() + ":" + TestSettings.port());
config.useSingleServer().setAddress("redis://" + TestSettings.host() + ":" + System.getProperty("REDIS_GEARS_PORT",
TestSettings.port() + ""));
redisGearsClient = new RedisGearsClient(config);
redisGearsClient.flushall();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public abstract class AbstractTest {
@BeforeEach
public void init() {
Config config = new Config();
config.useSingleServer().setAddress("redis://" + TestSettings.host() + ":" + TestSettings.port());
config.useSingleServer().setAddress("redis://" + TestSettings.host() + ":" + System.getProperty("REDIS_GRAPH_PORT",
TestSettings.port() + ""));
redisGraphClient = new RedisGraphClient(config);
redisGraphClient.flushall();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void testDelete() {
RedisGraph redisGraph = getRedisGraph();
assertThat(redisGraph.query("social",
"CREATE (:person{name:'roi',age:32, doubleValue:3.14, boolValue:true})", -1)).isNotNull();
assertThat(redisGraph.delete("social")).contains("Graph removed");
assertThat(redisGraph.delete("social")).contains("OK");
}

@Test
Expand Down

0 comments on commit 09718d7

Please sign in to comment.