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


##########
flink-runtime/src/test/java/org/apache/flink/runtime/highavailability/AbstractHaServicesTest.java:
##########
@@ -42,11 +43,7 @@
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.Executor;
 
-import static org.hamcrest.Matchers.contains;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.not;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
+import static org.assertj.core.api.Assertions.assertThat;
 
 /** Tests for the {@link AbstractHaServices}. */
 public class AbstractHaServicesTest extends TestLogger {

Review Comment:
   public class is not recommended for Junit5 if there is no other reason.



##########
flink-runtime/src/test/java/org/apache/flink/runtime/highavailability/AbstractHaServicesTest.java:
##########
@@ -104,12 +104,13 @@ public void 
testCloseAndCleanupAllDataDoesNotDeleteBlobsIfCleaningUpHADataFails(
 
         try {
             haServices.closeAndCleanupAllData();
-            fail("Expected that the close operation fails.");
+            Assertions.fail("Expected that the close operation fails.");

Review Comment:
   We should replace `fail` by `Assrtions.assertThatThrowBy`.



##########
flink-runtime/src/test/java/org/apache/flink/runtime/highavailability/AbstractHaServicesTest.java:
##########
@@ -42,20 +43,18 @@
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.Executor;
 
-import static org.hamcrest.Matchers.contains;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
+import static org.assertj.core.api.Assertions.assertThat;
 
 /** Tests for the {@link AbstractHaServices}. */
 public class AbstractHaServicesTest extends TestLogger {
 
     /**
-     * Tests that we first delete all pointers from the HA services before 
deleting the blobs. See
-     * FLINK-22014 for more details.
+     * Tests that we first delete all pointers from the HA services before 
deleting the blobs and HA
+     * storage path. See FLINK-22014 for more details.
      */
     @Test
-    public void testCloseAndCleanupAllDataDeletesBlobsAfterCleaningUpHAData() 
throws Exception {
+    public void 
testCloseAndCleanupAllDataDeletesBlobsAndHaStoragePathAfterCleaningUpHAData()

Review Comment:
   ```suggestion
       void 
testCloseAndCleanupAllDataDeletesBlobsAndHaStoragePathAfterCleaningUpHAData()
   ```
   All test methods should be package-private.



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