File tree 2 files changed +8
-6
lines changed
main/java/org/apache/flink/runtime/rest/handler
test/java/org/apache/flink/runtime/rest/handler
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -114,9 +114,7 @@ public static RestHandlerConfiguration fromConfiguration(Configuration configura
114
114
115
115
final int checkpointHistorySize = configuration .get (WebOptions .CHECKPOINTS_HISTORY_SIZE );
116
116
final Duration checkpointStatsSnapshotCacheExpireAfterWrite =
117
- configuration
118
- .getOptional (RestOptions .CACHE_CHECKPOINT_STATISTICS_TIMEOUT )
119
- .orElse (Duration .ofMillis (refreshInterval ));
117
+ configuration .get (RestOptions .CACHE_CHECKPOINT_STATISTICS_TIMEOUT );
120
118
final int checkpointStatsSnapshotCacheSize =
121
119
configuration .get (RestOptions .CACHE_CHECKPOINT_STATISTICS_SIZE );
122
120
Original file line number Diff line number Diff line change @@ -106,12 +106,16 @@ private static void testWebCancelFeatureFlag(boolean webCancelEnabled) {
106
106
107
107
@ Test
108
108
void testCheckpointCacheExpireAfterWrite () {
109
- final Duration testDuration = Duration .ofMillis (100L );
110
109
final Configuration config = new Configuration ();
111
- config .set (RestOptions .CACHE_CHECKPOINT_STATISTICS_TIMEOUT , testDuration );
112
-
110
+ final Duration defaultDuration = Duration .ofMillis (3000L );
113
111
RestHandlerConfiguration restHandlerConfiguration =
114
112
RestHandlerConfiguration .fromConfiguration (config );
113
+ assertThat (restHandlerConfiguration .getCheckpointCacheExpireAfterWrite ())
114
+ .isEqualTo (defaultDuration );
115
+
116
+ final Duration testDuration = Duration .ofMillis (100L );
117
+ config .set (RestOptions .CACHE_CHECKPOINT_STATISTICS_TIMEOUT , testDuration );
118
+ restHandlerConfiguration = RestHandlerConfiguration .fromConfiguration (config );
115
119
assertThat (restHandlerConfiguration .getCheckpointCacheExpireAfterWrite ())
116
120
.isEqualTo (testDuration );
117
121
}
You can’t perform that action at this time.
0 commit comments