go-livepeer
go-livepeer copied to clipboard
Refactor remote transcoding tests in orch_test.go to remove time.sleep
Is your feature request related to a problem? Please describe.
Remote transcoding tests might be flaky due to a time.sleep
required with go-routines to connect remote T for testing.
There are currently 5 such tests:
https://github.com/livepeer/go-livepeer/blob/f07d69da2ddbfbd163e05ccbb90d1c1d47052a95/core/orch_test.go#L33
https://github.com/livepeer/go-livepeer/blob/f07d69da2ddbfbd163e05ccbb90d1c1d47052a95/core/orch_test.go#L186
https://github.com/livepeer/go-livepeer/blob/f07d69da2ddbfbd163e05ccbb90d1c1d47052a95/core/orch_test.go#L243
https://github.com/livepeer/go-livepeer/blob/f07d69da2ddbfbd163e05ccbb90d1c1d47052a95/core/orch_test.go#L346
https://github.com/livepeer/go-livepeer/blob/f07d69da2ddbfbd163e05ccbb90d1c1d47052a95/core/orch_test.go#L422
Describe the solution you'd like
Refactor remote transcoding tests inside of orch_test.go
to allow for remote transcoders to be connected without using go-routines or time.sleep
. As recommended in #2747. One additional test should be added once resolved. I've published this to my branch here: https://github.com/eliteprox/go-livepeer/tree/develop-trancoderdrop-tests
Describe alternatives you've considered
Considered leaving the time.sleep
in the tests, decision made to not add the new test at this time.
Additional context None