tzulitai commented on a change in pull request #32: [FLINK-16149][hotfix][core]
Use GlobalConfiguration.loadConfiguration() on StreamPlanEnvironment
URL: https://github.com/apache/flink-statefun/pull/32#discussion_r383644382
##########
File path:
statefun-end-to-end-tests/statefun-sanity-itcase/src/test/java/org/apache/flink/statefun/itcases/sanity/SanityVerificationITCase.java
##########
@@ -61,14 +62,20 @@
private static final String CONFLUENT_PLATFORM_VERSION = "5.0.3";
+ private static final Configuration flinkConf = new Configuration();
+
+ static {
+ flinkConf.setString("statefun.module.global-config.kafka-broker",
Constants.KAFKA_BROKER_HOST);
+ }
+
@Rule
public KafkaContainer kafka =
new KafkaContainer(CONFLUENT_PLATFORM_VERSION)
.withNetworkAliases(Constants.KAFKA_BROKER_HOST);
@Rule
public StatefulFunctionsAppContainers verificationApp =
- new StatefulFunctionsAppContainers("sanity-verification", 2)
+ new StatefulFunctionsAppContainers("sanity-verification", 2, flinkConf)
Review comment:
[suggested as a follow-up, no need for this PR]
It'll be nicer if this is supplied like:
```
public StatefulFunctionsAppContainers verificationApp =
new StatefulFunctionsAppContainers("sanity-verification", 2)
.withModuleGlobalConfiguration("kafka-broker",
kafka.getBootstrapServers())
.withConfiguration(ConfigOption option, configValue)
```
And by default the `StatefulFunctionsAppContainers` just only has the
configs in the base template `flink-conf.yaml`.
That would eliminate the need for explicitly setting a network alias for the
`KafkaContainer` (i.e. less boilerplate code in these e2e tests).
This would require lazy construction of the containers on `beforeTest`, a
slightly bigger change that is out-of-scope here. So I suggest not including it
in this PR.
WDYT @sjwiesman ?
I can follow-up on that, but wondering how you feel about this suggestion.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services