Myasuka commented on a change in pull request #18217:
URL: https://github.com/apache/flink/pull/18217#discussion_r776954948



##########
File path: 
flink-core/src/test/java/org/apache/flink/api/common/state/StateDescriptorTest.java
##########
@@ -251,6 +253,15 @@ public void go() {
         threads.clear();
     }
 
+    @Test
+    public void testStateTTlConfig() {
+        ValueStateDescriptor<Integer> stateDescriptor =
+                new ValueStateDescriptor<>("test-state", 
IntSerializer.INSTANCE);
+        Assert.assertFalse(stateDescriptor.getTtlConfig().isEnabled());
+        stateDescriptor.enableTimeToLive(StateTtlConfig.DISABLED);
+        Assert.assertFalse(stateDescriptor.getTtlConfig().isEnabled());

Review comment:
       If without the modification in `StateDescriptor.java`, the line 261 
would fail.
   I think we could improve the testing to verify it could hanlde non-disabled 
state ttl config and then also handle disablaed ttl config.




-- 
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]


Reply via email to