rkhachatryan commented on a change in pull request #19081:
URL: https://github.com/apache/flink/pull/19081#discussion_r826017716
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/testutils/MiniClusterResource.java
##########
@@ -253,12 +265,44 @@ private void startMiniCluster() throws Exception {
* TaskManagerConf. Configurations which relates to streaming should be
randomized in
* TestStreamEnvironment#randomizeConfiguration.
*/
- private static void randomizeConfiguration(Configuration configuration) {
+ private void randomizeConfiguration(Configuration configuration) throws
IOException {
// randomize ITTests for enabling buffer de-bloating
if (RANDOMIZE_BUFFER_DEBLOAT_CONFIG
&&
!configuration.contains(TaskManagerOptions.BUFFER_DEBLOAT_ENABLED)) {
randomize(configuration,
TaskManagerOptions.BUFFER_DEBLOAT_ENABLED, true, false);
}
+
+ // randomize ITTests for enabling state change log
+ if (isConfigurationSupportedByChangelog(configuration)) {
+ if
(STATE_CHANGE_LOG_CONFIG.equalsIgnoreCase(STATE_CHANGE_LOG_CONFIG_ON)) {
+ if (!configuration.contains(ENABLE_STATE_CHANGE_LOG)) {
+ configuration.set(ENABLE_STATE_CHANGE_LOG, true);
+ }
+ } else if
(STATE_CHANGE_LOG_CONFIG.equalsIgnoreCase(STATE_CHANGE_LOG_CONFIG_RAND)) {
+ if (randomize(configuration, ENABLE_STATE_CHANGE_LOG, true,
false)) {
Review comment:
IIUC, another issue is that if `MiniCluster` is used directly (i.e.
without `MiniClusterResource`), the randomization won't be triggered. If that's
the case, I think it's better to move it back to `TestStreamEnvironment` to
have a better coverage.
Besides that, having all randomizations in a single place is more
straightforward to analyze.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]