Annotation Type EnableNatsStreamingServer
-
@Retention(RUNTIME) @Target(TYPE) @Documented @Inherited public @interface EnableNatsStreamingServer
Annotation that can be specified on a test class that runs Nats based tests. Provides the following features over and above the regular SpringTestContext
Framework:- Registers a
NatsStreamingServer
bean with theNatsStreamingServer
bean name.
The typical usage of this annotation is like:
@
SpringBootTest
@EnableNatsStreamingServer
public class MyNatsTests { @Autowired
privateNatsStreamingServer
natsServer; } - Registers a
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String[]
config
Passes the original parameters toNatsStreamingServer#setConfig(String...)
for startupNatsStreamingConfig
int
port
Passes port number toNatsStreamingServer#setConfig(String...)
boolean
randomPort
Random portlong
timeoutMs
Defines the startup and teardown timeout
-
-
-
-
config
String[] config
Passes the original parameters toNatsStreamingServer#setConfig(String...)
for startupNatsStreamingConfig
- Default:
- {}
-
-