[ 
https://issues.apache.org/jira/browse/YUNIKORN-3431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Huang reassigned YUNIKORN-3431:
------------------------------------

    Assignee:     (was: Andy Huang)

> Add regression test coverage for KubernetesShim scheduling loop shutdown
> ------------------------------------------------------------------------
>
>                 Key: YUNIKORN-3431
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-3431
>             Project: Apache YuniKorn
>          Issue Type: Test
>            Reporter: Andy Huang
>            Priority: Minor
>
> YUNIKORN-3367 changes KubernetesShim.Stop() from sending a single value on 
> stopChan to closing the channel, so both wait.Until goroutines started by 
> KubernetesShim.doScheduling() stop.
> The current unit tests verify that stopChan is closed and that Stop() is 
> idempotent, but they do not start doScheduling() or verify that both 
> scheduling-loop goroutines terminate. A regression to a buffered channel with 
> a single send could still satisfy the current channel assertion while leaving 
> one loop running.
> Add a regression test that:
>  * starts KubernetesShim successfully with the mock scheduler, so both 
> schedule and checkOutstandingApps loops are running;
>  * calls Stop();
>  * verifies that both loop goroutines terminate.
> Possible implementations:
>  * use goleak.VerifyNone scoped to this test, after the shared goleak support 
> from YUNIKORN-3357 is available; or
>  * add a testable loop-completion signal/counter to KubernetesShim and wait 
> for both goroutines to exit.
> The test should specifically protect against the original single-send 
> shutdown failure.
> Related issues:
>  * https://issues.apache.org/jira/browse/YUNIKORN-3367
>  * [https://github.com/apache/yunikorn-k8shim/pull/1074]



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to