You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ro...@apache.org on 2022/02/14 23:22:46 UTC
[flink] 02/02: [FLINK-23559][tests] Randomize periodic materialisation interval in tests
This is an automated email from the ASF dual-hosted git repository.
roman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 6eeb7e193cf69d788916c000e48163fa4216dc73
Author: Roman Khachatryan <kh...@gmail.com>
AuthorDate: Fri Jan 28 00:53:06 2022 +0100
[FLINK-23559][tests] Randomize periodic materialisation interval in tests
---
.../org/apache/flink/streaming/util/TestStreamEnvironment.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/streaming/util/TestStreamEnvironment.java b/flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/streaming/util/TestStreamEnvironment.java
index f201aeb..6fe754e 100644
--- a/flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/streaming/util/TestStreamEnvironment.java
+++ b/flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/streaming/util/TestStreamEnvironment.java
@@ -131,6 +131,15 @@ public class TestStreamEnvironment extends StreamExecutionEnvironment {
boolean enabled =
randomize(conf, StateChangelogOptions.ENABLE_STATE_CHANGE_LOG, true, false);
if (enabled) {
+ randomize(
+ conf,
+ StateChangelogOptions.PERIODIC_MATERIALIZATION_INTERVAL,
+ Duration.ofMillis(100),
+ Duration.ofMillis(500),
+ Duration.ofSeconds(1),
+ Duration.ofSeconds(5),
+ Duration.ofSeconds(
+ Long.MAX_VALUE / 1000 /* max allowed by Duration.toMillis */));
miniCluster.overrideRestoreModeForRandomizedChangelogStateBackend();
}
}