akalash commented on a change in pull request #19081:
URL: https://github.com/apache/flink/pull/19081#discussion_r826211590
##########
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:
You are right about randomization without `MiniClusterResource` so
perhaps, it is better to have it inside `TestStreamEnvironment`. But if we keep
it inside `TestStreamEnvironment` it is not possible to set
`STATE_CHANGE_LOG_STORAGE` for all test since it should be done before
`TestStreamEnvironment`. So perhaps, it is actually not a problem and we can
just fix the `BoundedSourceITCase`.
You can take a look at the second commit(the first one I will remove later).
Unfortunately, there is a problem with creating TEMPORARY_FOLDER since it
should be done before MINI_CLUSTER. I have not resolved this problem yet and
current solution looks ugly. I try to think about how to do it in a more
natural way but until now I have not found another way.
--
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]