embedded-redis
embedded-redis copied to clipboard
RedisServer#stop not working properly
It looks like that RedisServer#stop method doesn't terminate corresponding threads. And so App doesn't terminates.
Here is Main class code:
public static void main(String[] args) throws IOException, InterruptedException {
RedisServer redisServer = new RedisServer();
System.out.println("starting...");
redisServer.start();
Thread.sleep(5000);
System.out.println("stopping...");
redisServer.stop();
}
Version:
<dependency>
<groupId>com.github.kstyrc</groupId>
<artifactId>embedded-redis</artifactId>
<version>0.6</version>
</dependency>
JDK:
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)
@ilya-bystrov I'm seeing the same problem in my use as well. In my case redisServer.stop() completes and the actual server appears to shut down, as prior to calling stop() I can connect via command-line client but after calling stop() I can no longer connect. But my Java app will not shut down.
@kstyrc / anyone: Any update on this issue?
Upgrading to the new, currently still managed project fixed this:
<dependency>
<groupId>it.ozimov</groupId>
<artifactId>embedded-redis</artifactId>
<version>0.7.2</version>
</dependency>