nastra commented on code in PR #13400:
URL: https://github.com/apache/iceberg/pull/13400#discussion_r2538878740


##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -3163,4 +3382,459 @@ private static List<HTTPRequest> 
allRequests(RESTCatalogAdapter adapter) {
     verify(adapter, atLeastOnce()).execute(captor.capture(), any(), any(), 
any());
     return captor.getAllValues();
   }
+
+  @Test
+  public void testCancelPlanWithNoActivePlan() {
+    
configurePlanningBehavior(TestPlanningBehavior.Builder::synchronousWithPagination);
+    RESTTableScan restTableScan = restTableScanFor("cancel_test_table");
+
+    // Calling cancel with no active plan should return false
+    assertThat(restTableScan.cancelPlan()).isFalse();
+  }
+
+  @Test
+  public void testCancelPlanEndpointSupport() {

Review Comment:
   this test and the one above basically do the exact same thing but are named 
differently



##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -3163,4 +3382,459 @@ private static List<HTTPRequest> 
allRequests(RESTCatalogAdapter adapter) {
     verify(adapter, atLeastOnce()).execute(captor.capture(), any(), any(), 
any());
     return captor.getAllValues();
   }
+
+  @Test
+  public void testCancelPlanWithNoActivePlan() {
+    
configurePlanningBehavior(TestPlanningBehavior.Builder::synchronousWithPagination);
+    RESTTableScan restTableScan = restTableScanFor("cancel_test_table");
+
+    // Calling cancel with no active plan should return false
+    assertThat(restTableScan.cancelPlan()).isFalse();
+  }
+
+  @Test
+  public void testCancelPlanEndpointSupport() {

Review Comment:
   maybe we should just keep `testCancelPlanMethodAvailability()` and remove 
the other two test methods?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to