carp84 commented on a change in pull request #12078:
URL: https://github.com/apache/flink/pull/12078#discussion_r429752787



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlStateTestBase.java
##########
@@ -208,7 +209,7 @@ public void testExactExpirationOnWrite() throws Exception {
 
                timeProvider.time = 300;
                assertEquals(EXPIRED_UNAVAIL, ctx().emptyValue, ctx().get());
-               assertEquals("Original state should be cleared on access", 
ctx().emptyValue, ctx().getOriginal());
+               assertTrue(ctx().isOriginalEmptyValue());

Review comment:
       ```suggestion
                assertTrue("Original state should be cleared on access", 
ctx().isOriginalEmptyValue());
   ```

##########
File path: 
flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/ttl/RocksDBTtlStateTestBase.java
##########
@@ -161,11 +162,11 @@ private void testCompactFilter(boolean takeSnapshot, 
boolean rescaleAfterRestore
 
                setTimeAndCompact(stateDesc, 170L);
                sbetc.setCurrentKey("k1");
-               assertEquals("Expired original state should be unavailable", 
ctx().emptyValue, ctx().getOriginal());
+               assertTrue(ctx().isOriginalEmptyValue());

Review comment:
       ```suggestion
                assertTrue("Expired original state should be unavailable", 
ctx().isOriginalEmptyValue());
   ```

##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlStateTestBase.java
##########
@@ -222,7 +223,7 @@ public void testRelaxedExpirationOnWrite() throws Exception 
{
 
                timeProvider.time = 120;
                assertEquals(EXPIRED_AVAIL, ctx().getUpdateEmpty, ctx().get());
-               assertEquals("Original state should be cleared on access", 
ctx().emptyValue, ctx().getOriginal());
+               assertTrue(ctx().isOriginalEmptyValue());

Review comment:
       ```suggestion
                assertTrue("Original state should be cleared on access", 
ctx().isOriginalEmptyValue());
   ```

##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlStateTestBase.java
##########
@@ -247,7 +248,7 @@ public void testExactExpirationOnRead() throws Exception {
 
                timeProvider.time = 250;
                assertEquals(EXPIRED_UNAVAIL, ctx().emptyValue, ctx().get());
-               assertEquals("Original state should be cleared on access", 
ctx().emptyValue, ctx().getOriginal());
+               assertTrue(ctx().isOriginalEmptyValue());

Review comment:
       ```suggestion
                assertTrue("Original state should be cleared on access", 
ctx().isOriginalEmptyValue());
   ```

##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/TtlStateTestBase.java
##########
@@ -509,7 +510,7 @@ public void testIncrementalCleanup() throws Exception {
        private void checkExpiredKeys(int startKey, int endKey) throws 
Exception {
                for (int i = startKey; i < endKey; i++) {
                        sbetc.setCurrentKey(Integer.toString(i));
-                       assertEquals("Original state should be cleared", 
ctx().emptyValue, ctx().getOriginal());
+                       assertTrue(ctx().isOriginalEmptyValue());

Review comment:
       ```suggestion
                        assertTrue("Original state should be cleared", 
ctx().isOriginalEmptyValue());
   ```

##########
File path: 
flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/ttl/RocksDBTtlStateTestBase.java
##########
@@ -161,11 +162,11 @@ private void testCompactFilter(boolean takeSnapshot, 
boolean rescaleAfterRestore
 
                setTimeAndCompact(stateDesc, 170L);
                sbetc.setCurrentKey("k1");
-               assertEquals("Expired original state should be unavailable", 
ctx().emptyValue, ctx().getOriginal());
+               assertTrue(ctx().isOriginalEmptyValue());
                assertEquals(EXPIRED_UNAVAIL, ctx().emptyValue, ctx().get());
 
                sbetc.setCurrentKey("k2");
-               assertEquals("Expired original state should be unavailable", 
ctx().emptyValue, ctx().getOriginal());
+               assertTrue(ctx().isOriginalEmptyValue());

Review comment:
       ```suggestion
                assertTrue("Expired original state should be unavailable", 
ctx().isOriginalEmptyValue());
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to