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
binaryFile
File to nats server binary so no download will be neededString[]
config
Passes the original parameters toNatsStreaming.config(String...)
for startupNatsStreamingConfig
String
configFile
Config fileString
downloadUrl
Custom download URLint
port
Sets nats port -1 means random portlong
timeoutMs
Defines the startup and teardown timeout
-
-
-
-
configFile
String configFile
Config file- Default:
- ""
-
-
-
downloadUrl
String downloadUrl
Custom download URL- Default:
- ""
-
-
-
binaryFile
String binaryFile
File to nats server binary so no download will be needed- Default:
- ""
-
-
-
config
String[] config
Passes the original parameters toNatsStreaming.config(String...)
for startupNatsStreamingConfig
- Default:
- {}
-
-