Feature - Support CLIENT LIST command for Spring Data #6108
Signed-off-by: xuxiaolei <seakider@gmail.com>pull/6372/head
parent
8e325a95f4
commit
ec684623be
@ -0,0 +1,20 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package org.redisson.spring.data.connection;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.redis.connection.ReactiveRedisConnection;
|
||||
import org.springframework.data.redis.core.types.RedisClientInfo;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RedissonReactiveServerCommandsTest extends BaseConnectionTest {
|
||||
@Test
|
||||
public void testGetClientList() {
|
||||
RedissonConnectionFactory factory = new RedissonConnectionFactory(redisson);
|
||||
ReactiveRedisConnection reactiveConnection = factory.getReactiveConnection();
|
||||
Flux<RedisClientInfo> flux = reactiveConnection.serverCommands().getClientList();
|
||||
Mono<Long> count = flux.count();
|
||||
count.subscribe(s -> assertThat(s).isGreaterThan(10));
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue