Skip to content

Commit 09718d7

Browse files
denglimingLiming Deng
authored and
Liming Deng
committed
fix ci
1 parent b8a1619 commit 09718d7

File tree

8 files changed

+34
-56
lines changed

8 files changed

+34
-56
lines changed

.github/workflows/build.yml

+21-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
services:
15-
redismod:
16-
image: redislabs/redismod:edge
15+
redis-stack-server:
16+
image: redis/redis-stack-server:edge
1717
options: >-
1818
--health-cmd "redis-cli ping"
1919
--health-interval 10s
@@ -30,6 +30,24 @@ jobs:
3030
--health-retries 5
3131
ports:
3232
- 52568:6379
33+
redisgears:
34+
image: redislabs/redisgears:latest
35+
options: >-
36+
--health-cmd "redis-cli ping"
37+
--health-interval 10s
38+
--health-timeout 5s
39+
--health-retries 5
40+
ports:
41+
- 6383:6379
42+
redisgraph:
43+
image: redislabs/redisgraph:edge
44+
options: >-
45+
--health-cmd "redis-cli ping"
46+
--health-interval 10s
47+
--health-timeout 5s
48+
--health-retries 5
49+
ports:
50+
- 6384:6379
3351
steps:
3452
- uses: actions/checkout@v2
3553
- name: Set up JDK 1.8
@@ -44,5 +62,5 @@ jobs:
4462
restore-keys: |
4563
${{ runner.os }}-maven-
4664
- name: Build with Maven
47-
run: mvn clean install -DREDIS_HOST=localhost -DREDIS_PORT=52567 -DREDISAI_PORT=52568 -Dgpg.skip --file pom.xml
65+
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
4866
- uses: codecov/codecov-action@v1

commons/src/test/java/io/github/dengliming/redismodule/common/test/RedisConditions.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 dengliming.
2+
* Copyright 2022-2024 dengliming.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,7 +19,9 @@
1919
import org.redisson.client.codec.StringCodec;
2020
import org.redisson.client.protocol.RedisCommand;
2121
import org.redisson.client.protocol.decoder.ListMultiDecoder2;
22+
import org.redisson.client.protocol.decoder.MapKeyDecoder;
2223
import org.redisson.client.protocol.decoder.ObjectListReplayDecoder;
24+
import org.redisson.client.protocol.decoder.ObjectSetReplayDecoder;
2325
import org.redisson.client.protocol.decoder.StringListReplayDecoder;
2426
import org.redisson.command.CommandAsyncExecutor;
2527

@@ -28,12 +30,11 @@
2830

2931
public class RedisConditions {
3032

31-
private static final RedisCommand COMMAND = new RedisCommand<>("COMMAND",
32-
new ListMultiDecoder2<>(new RedisConditionsDecoder(), new ObjectListReplayDecoder<>(),
33-
new StringListReplayDecoder()));
33+
private static final RedisCommand COMMAND = new RedisCommand<>("COMMAND", "LIST",
34+
new MapKeyDecoder(new ObjectSetReplayDecoder()));
3435

3536
private static final RedisCommand MODULE_LIST = new RedisCommand<>("MODULE", "LIST",
36-
new ListMultiDecoder2<>(new ModuleListDecoder(), new ObjectListReplayDecoder<>()));
37+
new ListMultiDecoder2<>(new ModuleListDecoder(), new ObjectListReplayDecoder<>(), new StringListReplayDecoder()));
3738

3839
private final Set<String> commands;
3940

commons/src/test/java/io/github/dengliming/redismodule/common/test/RedisConditionsDecoder.java

-43
This file was deleted.

redisbloom/src/main/java/io/github/dengliming/redismodule/redisbloom/TopKFilter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public List<String> list() {
140140
}
141141

142142
public RFuture<List<String>> listAsync() {
143-
return commandExecutor.readAsync(getName(), codec, TOPK_LIST, getName());
143+
return commandExecutor.readAsync(getName(), StringCodec.INSTANCE, TOPK_LIST, getName());
144144
}
145145

146146
/**

redisearch/src/main/java/io/github/dengliming/redismodule/redisearch/RediSearch.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ public Map<String, String> getConfig(ConfigOption option) {
386386
public RFuture<Map<String, String>> getConfigAsync(ConfigOption option) {
387387
RAssert.notNull(option, "ConfigOption must be not null");
388388

389-
return commandExecutor.readAsync(getName(), codec, FT_CONFIG_GET, option.getKeyword());
389+
return commandExecutor.readAsync(getName(), StringCodec.INSTANCE, FT_CONFIG_GET, option.getKeyword());
390390
}
391391

392392
public Map<String, String> getHelp(ConfigOption option) {

redisgears/src/test/java/io/github/dengliming/redismodule/redisgears/AbstractTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public abstract class AbstractTest {
3232
@BeforeEach
3333
public void init() {
3434
Config config = new Config();
35-
config.useSingleServer().setAddress("redis://" + TestSettings.host() + ":" + TestSettings.port());
35+
config.useSingleServer().setAddress("redis://" + TestSettings.host() + ":" + System.getProperty("REDIS_GEARS_PORT",
36+
TestSettings.port() + ""));
3637
redisGearsClient = new RedisGearsClient(config);
3738
redisGearsClient.flushall();
3839
}

redisgraph/src/test/java/io/github/dengliming/redismodule/redisgraph/AbstractTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public abstract class AbstractTest {
3232
@BeforeEach
3333
public void init() {
3434
Config config = new Config();
35-
config.useSingleServer().setAddress("redis://" + TestSettings.host() + ":" + TestSettings.port());
35+
config.useSingleServer().setAddress("redis://" + TestSettings.host() + ":" + System.getProperty("REDIS_GRAPH_PORT",
36+
TestSettings.port() + ""));
3637
redisGraphClient = new RedisGraphClient(config);
3738
redisGraphClient.flushall();
3839
}

redisgraph/src/test/java/io/github/dengliming/redismodule/redisgraph/RedisGraphTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void testDelete() {
4949
RedisGraph redisGraph = getRedisGraph();
5050
assertThat(redisGraph.query("social",
5151
"CREATE (:person{name:'roi',age:32, doubleValue:3.14, boolValue:true})", -1)).isNotNull();
52-
assertThat(redisGraph.delete("social")).contains("Graph removed");
52+
assertThat(redisGraph.delete("social")).contains("OK");
5353
}
5454

5555
@Test

0 commit comments

Comments
 (0)