reswqa commented on code in PR #22445:
URL: https://github.com/apache/flink/pull/22445#discussion_r1176281072


##########
flink-queryable-state/flink-queryable-state-client-java/src/test/java/org/apache/flink/queryablestate/client/state/ImmutableAggregatingStateTest.java:
##########
@@ -24,23 +24,24 @@
 import org.apache.flink.api.common.state.AggregatingStateDescriptor;
 import org.apache.flink.core.memory.DataOutputViewStreamWrapper;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import java.io.ByteArrayOutputStream;
 
-import static org.junit.Assert.assertEquals;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.junit.jupiter.api.Assertions.assertEquals;

Review Comment:
   Why is it still there, we shouldn't use any non-assertJ assertions anymore.



##########
flink-queryable-state/flink-queryable-state-client-java/src/test/java/org/apache/flink/queryablestate/client/state/ImmutableMapStateTest.java:
##########
@@ -24,28 +24,29 @@
 import org.apache.flink.api.common.typeinfo.BasicTypeInfo;
 import 
org.apache.flink.queryablestate.client.state.serialization.KvStateSerializer;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;

Review Comment:
   These should all be removed.



##########
flink-queryable-state/flink-queryable-state-client-java/src/test/java/org/apache/flink/queryablestate/client/state/ImmutableListStateTest.java:
##########
@@ -56,26 +58,23 @@ public void setUp() throws Exception {
         listState = ImmutableListState.createState(listStateDesc, serInit);
     }
 
-    @Test(expected = UnsupportedOperationException.class)
-    public void testUpdate() throws Exception {
+    @Test
+    void testUpdate() throws Exception {
         List<Long> list = getStateContents();
-        assertEquals(1L, list.size());
-
-        long element = list.get(0);
-        assertEquals(42L, element);
-
-        listState.add(54L);
+        assertThat(list).hasSize(1);
+        assertThat(list).contains(42L, Index.atIndex(0));

Review Comment:
   ```suggestion
       assertThat(list).containsExactly(42L);
   ```



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