You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "jiexray (via GitHub)" <gi...@apache.org> on 2023/04/24 12:53:39 UTC

[GitHub] [flink] jiexray commented on a diff in pull request #22445: [FLINK-31876][QS] Migrate flink-queryable-state-client tests to JUnit5

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


##########
flink-queryable-state/flink-queryable-state-client-java/src/test/java/org/apache/flink/queryablestate/client/state/ImmutableListStateTest.java:
##########
@@ -56,26 +57,34 @@ public void setUp() throws Exception {
         listState = ImmutableListState.createState(listStateDesc, serInit);
     }
 
-    @Test(expected = UnsupportedOperationException.class)
-    public void testUpdate() throws Exception {
-        List<Long> list = getStateContents();
-        assertEquals(1L, list.size());
+    @Test
+    void testUpdate() {
+        assertThatThrownBy(
+                        () -> {
+                            List<Long> list = getStateContents();
+                            assertEquals(1L, list.size());

Review Comment:
   Better use `assertThat(list).hasSize(1)`



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org