public final class EventTestKit extends java.lang.Object implements RedisStore
Example:
private val testKit = EventTestKit()
// starting event server (start sentinel on port 6379 and master on port 6378)
// it will also register EventService with location service
testKit.startEventService(sentinelPort = 6379, serverPort = 6378)
// stopping event server
testKit.shutdownEventService()
Modifier and Type | Method and Description |
---|---|
static EventTestKit |
apply(akka.actor.ActorSystem actorSystem,
TestKitSettings testKitSettings)
Create a EventTestKit
|
protected Connection.TcpConnection |
connection() |
static EventTestKit |
create(akka.actor.ActorSystem actorSystem)
Java API to create a EventTestKit
|
static EventTestKit |
create(TestKitSettings testKitSettings)
Java API to create a EventTestKit
|
static csw.location.api.scaladsl.LocationService |
csw$testkit$redis$RedisStore$$locationService() |
static void |
csw$testkit$redis$RedisStore$$redisSentinel_$eq(scala.Option<redis.embedded.RedisSentinel> x$1) |
static scala.Option<redis.embedded.RedisSentinel> |
csw$testkit$redis$RedisStore$$redisSentinel() |
static void |
csw$testkit$redis$RedisStore$$redisServer_$eq(scala.Option<redis.embedded.RedisServer> x$1) |
static scala.Option<redis.embedded.RedisServer> |
csw$testkit$redis$RedisStore$$redisServer() |
scala.concurrent.ExecutionContext |
ec() |
protected java.lang.String |
masterId() |
akka.stream.Materializer |
mat() |
static void |
shutdown() |
void |
shutdownEventService()
Shutdown Event service
|
static RegistrationResult |
start(int sentinelPort,
int serverPort) |
static void |
start(java.util.Optional<java.lang.Object> sentinelPort,
java.util.Optional<java.lang.Object> serverPort) |
static int |
start$default$1() |
static int |
start$default$2() |
RegistrationResult |
startEventService(int sentinelPort,
int serverPort)
Scala API to Start Event service
|
void |
startEventService(java.util.Optional<java.lang.Object> sentinelPort,
java.util.Optional<java.lang.Object> serverPort)
Java API to Start Event service
|
static scala.Tuple2<redis.embedded.RedisSentinel,redis.embedded.RedisServer> |
startSentinel(int sentinelPort,
int serverPort,
java.lang.String masterId) |
static int |
startSentinel$default$1() |
static int |
startSentinel$default$2() |
static void |
stopRedis() |
static void |
stopSentinel(redis.embedded.RedisSentinel redisSentinel,
redis.embedded.RedisServer redisServer) |
akka.actor.ActorSystem |
system() |
akka.util.Timeout |
timeout() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
shutdown, start, start, stopRedis
addJvmShutdownHook, startSentinel, stopSentinel
public static EventTestKit apply(akka.actor.ActorSystem actorSystem, TestKitSettings testKitSettings)
When the test has completed you should shutdown the event service
with shutdownEventService()
.
actorSystem
- (undocumented)testKitSettings
- (undocumented)public static EventTestKit create(akka.actor.ActorSystem actorSystem)
actorSystem
- public static EventTestKit create(TestKitSettings testKitSettings)
testKitSettings
- custom testKitSettingspublic static scala.Tuple2<redis.embedded.RedisSentinel,redis.embedded.RedisServer> startSentinel(int sentinelPort, int serverPort, java.lang.String masterId)
public static void stopSentinel(redis.embedded.RedisSentinel redisSentinel, redis.embedded.RedisServer redisServer)
public static int startSentinel$default$1()
public static int startSentinel$default$2()
public static scala.Option<redis.embedded.RedisSentinel> csw$testkit$redis$RedisStore$$redisSentinel()
public static void csw$testkit$redis$RedisStore$$redisSentinel_$eq(scala.Option<redis.embedded.RedisSentinel> x$1)
public static scala.Option<redis.embedded.RedisServer> csw$testkit$redis$RedisStore$$redisServer()
public static void csw$testkit$redis$RedisStore$$redisServer_$eq(scala.Option<redis.embedded.RedisServer> x$1)
public static csw.location.api.scaladsl.LocationService csw$testkit$redis$RedisStore$$locationService()
public static RegistrationResult start(int sentinelPort, int serverPort)
public static void start(java.util.Optional<java.lang.Object> sentinelPort, java.util.Optional<java.lang.Object> serverPort)
public static void stopRedis()
public static void shutdown()
public static int start$default$1()
public static int start$default$2()
public akka.stream.Materializer mat()
mat
in interface RedisStore
public scala.concurrent.ExecutionContext ec()
ec
in interface RedisStore
public akka.actor.ActorSystem system()
system
in interface RedisStore
public akka.util.Timeout timeout()
timeout
in interface RedisStore
protected java.lang.String masterId()
masterId
in interface RedisStore
protected Connection.TcpConnection connection()
connection
in interface RedisStore
public RegistrationResult startEventService(int sentinelPort, int serverPort)
It will start redis sentinel and redis server on provided ports and then register's event service with location service
sentinelPort
- (undocumented)serverPort
- (undocumented)public void startEventService(java.util.Optional<java.lang.Object> sentinelPort, java.util.Optional<java.lang.Object> serverPort)
It will start redis sentinel and redis server on provided ports and then register's event service with location service
sentinelPort
- (undocumented)serverPort
- (undocumented)public void shutdownEventService()
When the test has completed, make sure you shutdown event service. This will terminate actor system and stop redis sentinel and redis server.