Restore the option to run Kafka tests embedded vs. external
Honour the `SCS_KAFKA_TEST_EMBEDDED` flag when set as an environment variable or Java property: when explicitly set to `false`, use an external broker and observe the `SCS_EXTERNAL_SERVERS_REQUIRED` property (i.e. fail if server is missing). By default, continue to run tests using an embedded broker.
This commit is contained in:
@@ -70,7 +70,9 @@ public class KafkaTestSupport extends AbstractExternalResourceTestSupport<String
|
||||
|
||||
static {
|
||||
// check if either the environment or Java property is set to use embedded tests
|
||||
defaultEmbedded = "true".equals(System.getenv(SCS_KAFKA_TEST_EMBEDDED)) || "true".equals(System.getProperty(SCS_KAFKA_TEST_EMBEDDED));
|
||||
// unless the property is explicitly set to false, default to embedded
|
||||
defaultEmbedded = !("false".equals(System.getenv(SCS_KAFKA_TEST_EMBEDDED))
|
||||
|| "false".equals(System.getProperty(SCS_KAFKA_TEST_EMBEDDED)));
|
||||
}
|
||||
|
||||
public KafkaTestSupport() {
|
||||
|
||||
Reference in New Issue
Block a user