debabhishek53 commented on code in PR #4187:
URL: https://github.com/apache/gobblin/pull/4187#discussion_r3115373893


##########
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/test/java/org/apache/gobblin/service/FlowExecutionResourceHandlerTest.java:
##########
@@ -17,12 +17,38 @@
 
 package org.apache.gobblin.service;
 
+import java.util.Collections;
+
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
+import org.apache.gobblin.service.monitoring.FlowStatus;
+
 
 public class FlowExecutionResourceHandlerTest {
 
+  @Test
+  public void testConvertFlowStatusCoercesUnknownToPending() {
+    FlowStatus unknownFlowStatus = new FlowStatus("flowName", "flowGroup", 
123L,
+        Collections.emptyIterator(), ExecutionStatus.$UNKNOWN);
+
+    FlowExecution flowExecution = 
FlowExecutionResource.convertFlowStatus(unknownFlowStatus, false);
+
+    Assert.assertNotNull(flowExecution);
+    Assert.assertEquals(flowExecution.getExecutionStatus(), 
ExecutionStatus.PENDING);
+  }
+
+  @Test
+  public void testConvertFlowStatusPreservesValidStatus() {

Review Comment:
   Can we add a terminal-status test case to 
testConvertFlowStatusPreservesValidStatus?



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