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

ASF GitHub Bot logged work on BEAM-13908:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Feb/22 23:10
            Start Date: 10/Feb/22 23:10
    Worklog Time Spent: 10m 
      Work Description: lostluck commented on pull request #16816:
URL: https://github.com/apache/beam/pull/16816#issuecomment-1035626538


   > Agree the mocking there isn't the right move. While one _can_ use 
unexported package level variables and override them with test specific 
options, they are still in a "global" namespace and can be brittle.
   > 
   > The right way to do that kind of mocking would be to pass in the thing 
being mocked into an unexported function to be called. Then the test 
implementation just calls the same function, passing in the test implementation.
   > 
   > Note that the "thing to be mocked" can be an interface, or an arbitrary 
configuration struct, so it doesn't necessarily end up as 1 new parameter per 
thing to be mocked.
   
   Let me know if you want to do the "refactor the make this more testable" 
approach, and if not, I'll merge this in as is.


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


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

    Worklog Id:     (was: 724843)
    Time Spent: 1h 10m  (was: 1h)

> Increase unit testing in the gcpopts package
> --------------------------------------------
>
>                 Key: BEAM-13908
>                 URL: https://issues.apache.org/jira/browse/BEAM-13908
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-go
>            Reporter: Jack McCluskey
>            Assignee: Danny McCormick
>            Priority: P2
>              Labels: starter
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Increase unit testing coverage in the [gcpopts 
> package|https://github.com/apache/beam/tree/release-2.36.0/sdks/go/pkg/beam/options/gcpopts]
> We want code coverage at or above 50%, it is currently at 40%.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to