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

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

                Author: ASF GitHub Bot
            Created on: 01/May/24 19:21
            Start Date: 01/May/24 19:21
    Worklog Time Spent: 10m 
      Work Description: arjun4084346 commented on code in PR #3937:
URL: https://github.com/apache/gobblin/pull/3937#discussion_r1586706509


##########
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/OrchestratorTest.java:
##########
@@ -114,6 +119,8 @@ public void setup() throws Exception {
     FlowLaunchHandler mockFlowTriggerHandler = mock(FlowLaunchHandler.class);
     DagManager mockDagManager = mock(DagManager.class);
     doNothing().when(mockDagManager).setTopologySpecMap(anyMap());
+    TopologySpecFactory mockedTopologySpecFactory = 
mock(TopologySpecFactory.class);
+    
doReturn(Collections.singleton(this.topologySpec)).when(mockedTopologySpecFactory).getTopologies();

Review Comment:
   I prefer this way, because in `when(obj.method()).thenReturn(obj)` it 
actually calls `obj.method()` which is rarely useful (and often generate 
exceptions) because obj is a mocked dummy object.





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

    Worklog Id:     (was: 917160)
    Time Spent: 1h 50m  (was: 1h 40m)

> initialize topology specs directly from the configs
> ---------------------------------------------------
>
>                 Key: GOBBLIN-2056
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2056
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Arjun Singh Bora
>            Priority: Major
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> initialize topology specs directly from the configs instead of waiting for 
> the callbacks of topology spec catalog listerners



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

Reply via email to