Skip to content

Commit 922a606

Browse files
committed
test: Using redis-stack 6.2.6 instead of latest
1 parent 9a8fbd5 commit 922a606

File tree

1 file changed

+37
-33
lines changed

1 file changed

+37
-33
lines changed

src/test/java/com/redis/trino/RediSearchServer.java

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,41 @@
1414

1515
public class RediSearchServer implements Closeable {
1616

17-
private static final DockerImageName DOCKER_IMAGE_NAME = RedisStackContainer.DEFAULT_IMAGE_NAME
18-
.withTag(RedisStackContainer.DEFAULT_TAG);
19-
private final RedisStackContainer container = new RedisStackContainer(DOCKER_IMAGE_NAME).withEnv("REDISEARCH_ARGS",
20-
"MAXAGGREGATERESULTS -1");
21-
private final AbstractRedisClient client;
22-
private final StatefulRedisModulesConnection<String, String> connection;
23-
24-
public RediSearchServer() {
25-
this.container.start();
26-
this.client = ClientBuilder.create(RedisURI.create(container.getRedisURI())).cluster(container.isCluster())
27-
.build();
28-
this.connection = RedisModulesUtils.connection(client);
29-
}
30-
31-
public String getRedisURI() {
32-
return container.getRedisURI();
33-
}
34-
35-
public AbstractRedisClient getClient() {
36-
return client;
37-
}
38-
39-
public StatefulRedisModulesConnection<String, String> getConnection() {
40-
return connection;
41-
}
42-
43-
@Override
44-
public void close() {
45-
connection.close();
46-
client.shutdown();
47-
client.getResources().shutdown();
48-
container.close();
49-
}
17+
private static final String TAG = "6.2.6-v9";
18+
19+
private static final DockerImageName DOCKER_IMAGE_NAME = RedisStackContainer.DEFAULT_IMAGE_NAME.withTag(TAG);
20+
21+
private final RedisStackContainer container = new RedisStackContainer(DOCKER_IMAGE_NAME).withEnv("REDISEARCH_ARGS",
22+
"MAXAGGREGATERESULTS -1");
23+
24+
private final AbstractRedisClient client;
25+
26+
private final StatefulRedisModulesConnection<String, String> connection;
27+
28+
public RediSearchServer() {
29+
this.container.start();
30+
this.client = ClientBuilder.create(RedisURI.create(container.getRedisURI())).cluster(container.isCluster()).build();
31+
this.connection = RedisModulesUtils.connection(client);
32+
}
33+
34+
public String getRedisURI() {
35+
return container.getRedisURI();
36+
}
37+
38+
public AbstractRedisClient getClient() {
39+
return client;
40+
}
41+
42+
public StatefulRedisModulesConnection<String, String> getConnection() {
43+
return connection;
44+
}
45+
46+
@Override
47+
public void close() {
48+
connection.close();
49+
client.shutdown();
50+
client.getResources().shutdown();
51+
container.close();
52+
}
53+
5054
}

0 commit comments

Comments
 (0)