Fix deprecation warnings
This commit is contained in:
@@ -26,6 +26,7 @@ import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.data.redis.connection.RedisConnection;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.connection.RedisServerCommands;
|
||||
import org.springframework.data.redis.connection.SubscriptionListener;
|
||||
import org.springframework.security.core.session.SessionDestroyedEvent;
|
||||
import org.springframework.session.MapSession;
|
||||
@@ -67,9 +68,11 @@ public abstract class AbstractHttpSessionListenerTests {
|
||||
static RedisConnectionFactory createMockRedisConnection() {
|
||||
RedisConnectionFactory factory = mock(RedisConnectionFactory.class);
|
||||
RedisConnection connection = mock(RedisConnection.class);
|
||||
RedisServerCommands commands = mock(RedisServerCommands.class);
|
||||
|
||||
given(factory.getConnection()).willReturn(connection);
|
||||
given(connection.getConfig(anyString())).willReturn(new Properties());
|
||||
given(connection.serverCommands()).willReturn(commands);
|
||||
given(commands.getConfig(anyString())).willReturn(new Properties());
|
||||
|
||||
willAnswer((it) -> {
|
||||
SubscriptionListener listener = it.getArgument(0);
|
||||
|
||||
Reference in New Issue
Block a user