[ 
https://issues.apache.org/jira/browse/GOBBLIN-1990?focusedWorklogId=902051&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-902051
 ]

ASF GitHub Bot logged work on GOBBLIN-1990:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Jan/24 00:10
            Start Date: 27/Jan/24 00:10
    Worklog Time Spent: 10m 
      Work Description: umustafi commented on code in PR #3864:
URL: https://github.com/apache/gobblin/pull/3864#discussion_r1468252492


##########
gobblin-service/src/test/java/org/apache/gobblin/service/GobblinServiceManagerTest.java:
##########
@@ -403,94 +429,145 @@ public void testCreateAgain() throws Exception {
     Assert.assertEquals(exception.getStatus(), HttpStatus.CONFLICT_409);
   }
 
+  /*
+  This test adds a new flowConfig to the client checks the config retrieved 
using the getFlowConfig endpoint matches it
+   */
   @Test (dependsOnMethods = "testCreateAgain")
   public void testGet() throws Exception {
-    FlowConfig flowConfig = this.flowConfigClient.getFlowConfig(TEST_FLOW_ID);
+    FlowId flowId = createFlowIdWithUniqueName(TEST_GROUP_NAME);
+    FlowConfig flowConfig = new FlowConfig().setId(flowId)
+        .setTemplateUris(TEST_TEMPLATE_URI).setSchedule(new 
Schedule().setCronSchedule(TEST_SCHEDULE).setRunImmediately(true))
+        .setProperties(new StringMap(flowProperties));
+    this.flowConfigClient.createFlowConfig(flowConfig);
 
-    Assert.assertEquals(flowConfig.getId().getFlowGroup(), TEST_GROUP_NAME);
-    Assert.assertEquals(flowConfig.getId().getFlowName(), TEST_FLOW_NAME);
-    Assert.assertEquals(flowConfig.getSchedule().getCronSchedule(), 
TEST_SCHEDULE);
-    Assert.assertEquals(flowConfig.getTemplateUris(), TEST_TEMPLATE_URI);
-    Assert.assertTrue(flowConfig.getSchedule().isRunImmediately());
+    FlowConfig getFlowConfig = this.flowConfigClient.getFlowConfig(flowId);
+    Assert.assertEquals(getFlowConfig.getId().getFlowGroup(), TEST_GROUP_NAME);
+    Assert.assertEquals(getFlowConfig.getId().getFlowName(), 
flowId.getFlowName());
+    Assert.assertEquals(getFlowConfig.getSchedule().getCronSchedule(), 
TEST_SCHEDULE);
+    Assert.assertEquals(getFlowConfig.getTemplateUris(), TEST_TEMPLATE_URI);
+    Assert.assertTrue(getFlowConfig.getSchedule().isRunImmediately());
     // Add this assert back when getFlowSpec() is changed to return the raw 
flow spec
-    //Assert.assertEquals(flowConfig.getProperties().size(), 1);
-    Assert.assertEquals(flowConfig.getProperties().get("param1"), "value1");
+    //Assert.assertEquals(getFlowConfig.getProperties().size(), 1);

Review Comment:
   Yes this is up-to-date





Issue Time Tracking
-------------------

    Worklog Id:     (was: 902051)
    Time Spent: 4.5h  (was: 4h 20m)

> Update GobblinServiceManagerTest to reduce flakiness
> ----------------------------------------------------
>
>                 Key: GOBBLIN-1990
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1990
>             Project: Apache Gobblin
>          Issue Type: Bug
>          Components: gobblin-service
>            Reporter: Urmi Mustafi
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> {{GobblinServiceManager}} tests are timing dependent and depend on state from 
> other unit tests. They frequently fail, showing different results on IDE 
> versus run in terminal with Gradle. We don't want to disable too many of them 
> since they are useful. However, we want to remove timing dependent tests and 
> decouple the tests so they do not depend on state from another test.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to