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

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

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


##########
gobblin-service/src/test/java/org/apache/gobblin/service/GobblinServiceManagerTest.java:
##########
@@ -603,43 +683,41 @@ public void testGetAllPaginated() throws Exception {
         .setProperties(new StringMap(flowProperties));
     this.flowConfigClient.createFlowConfig(flowConfig4);
 
-    // Check that there are a total of 4 flowConfigs by using the default 
getAll call
+    // Check that the size of flowConfigs has increased by 4 using the default 
getAll call
     Collection<FlowConfig> flowConfigs = 
this.flowConfigClient.getAllFlowConfigs();
-    Assert.assertEquals(flowConfigs.size(), 4);
+    Assert.assertEquals(flowConfigs.size(), sizeBefore + 4);
 
-    // Check that there are a total of 4 flowConfigs using new getAll call
+    // Check that the size of flowConfigs has increased by 4 using new getAll 
call
     flowConfigs = this.flowConfigClient.getAllFlowConfigs(0,20);
-    Assert.assertEquals(flowConfigs.size(), 4);
+    Assert.assertEquals(flowConfigs.size(), sizeBefore + 4);
 
     // Attempt pagination with one element from the start of the specStore 
configurations stored
     // Start at index 0 and return 1 element
-    flowConfigs = this.flowConfigClient.getAllFlowConfigs(0,1);
+    flowConfigs = this.flowConfigClient.getAllFlowConfigs(sizeBefore,1);
     Assert.assertEquals(flowConfigs.size(), 1);
-    
Assert.assertEquals(((FlowConfig)(flowConfigs.toArray()[0])).getId().getFlowName(),
 "testFlow");
+    // TODO: remove these assertions which are flaky because the flows above 
all show up with the same modification time
+//    
Assert.assertEquals(((FlowConfig)(flowConfigs.toArray()[0])).getId().getFlowName(),
 TEST_FLOW_ID.getFlowName());

Review Comment:
   That's done in the latter part of this test where we iterate through the 
flow names and ensure the 3 new names are present





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

    Worklog Id:     (was: 902025)
    Time Spent: 4h  (was: 3h 50m)

> 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: 4h
>  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