Skip to content

Commit

Permalink
[INLONG-9459][Sort] Fix redis table test cannot run on some operation…
Browse files Browse the repository at this point in the history
… systems (#9460)

* [INLONG-9459][Sort] Fix redis table test cannot run on some operation systems

* [INLONG-9459][Sort] Fix redis table test cannot run on some operation systems

(cherry picked from commit 938f482)
  • Loading branch information
EMsnap authored and vernedeng committed Dec 11, 2023
1 parent f4148e6 commit 7426680
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.codemonstur</groupId>
<groupId>it.ozimov</groupId>
<artifactId>embedded-redis</artifactId>
<version>${embedded.redis.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner_${flink.scala.binary.version}</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import redis.clients.jedis.Jedis;
import redis.embedded.RedisServer;

import java.io.IOException;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;

Expand All @@ -46,14 +45,14 @@ public class RedisTableTest {
private static RedisServer redisServer;

@BeforeClass
public static void setup() throws IOException {
public static void setup() {
redisPort = NetUtils.getAvailablePort();
redisServer = RedisServer.newRedisServer().setting("maxmemory 128m").port(redisPort).build();
redisServer = new RedisServer(redisPort);
redisServer.start();
}

@AfterClass
public static void cleanup() throws IOException {
public static void cleanup() {
if (redisServer != null) {
redisServer.stop();
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<dockerfile.maven.version>1.4.13</dockerfile.maven.version>
<testcontainers.version>1.17.2</testcontainers.version>
<docker.organization>inlong</docker.organization>
<embedded.redis.version>1.1.0</embedded.redis.version>
<embedded.redis.version>0.7.3</embedded.redis.version>

<netty.version>4.1.94.Final</netty.version>
<jboss.netty.version>3.10.6.Final</jboss.netty.version>
Expand Down

0 comments on commit 7426680

Please sign in to comment.