You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by "Manikandan R (Jira)" <ji...@apache.org> on 2026/10/06 10:46:00 UTC
[jira] [Resolved] (YUNIKORN-3488) Flaky event-count assertions in scheduler_callback_test.go
[ https://issues.apache.org/jira/browse/YUNIKORN-3488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Manikandan R resolved YUNIKORN-3488.
------------------------------------
Fix Version/s: 1.11.0
Target Version: 1.11.0
Resolution: Fixed
> Flaky event-count assertions in scheduler_callback_test.go
> ----------------------------------------------------------
>
> Key: YUNIKORN-3488
> URL: https://issues.apache.org/jira/browse/YUNIKORN-3488
> Project: Apache YuniKorn
> Issue Type: Bug
> Components: shim - kubernetes, test - unit
> Reporter: TingYao Huang
> Assignee: Dian-Xuan Yang
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.11.0
>
>
> Some tests in {{pkg/cache/scheduler_callback_test.go}} wait for an FSM state and then immediately count the recorded K8s events. The events are emitted in after-event callbacks, which run after the new state is already visible, so the count can be checked before the event is recorded:
> * {{{}TestUpdateAllocation_PlaceholderTask_AssumePodFails{}}}: {{{}2 (int) != 1 (int){}}}. Since YUNIKORN-3421 the TaskFailed event is emitted in {{{}afterTaskFail(){}}}. Seen in CI.
> * {{{}TestUpdateApplication_Failing{}}}, {{{}TestUpdateApplication_Failed{}}}, {{{}TestUpdateApplication_Rejected{}}}: {{{}1 (int) != 0 (int){}}}. {{TestUpdateApplication_Failing}} fails about 1% of the time locally under CPU load.
> This is a test-only issue. Emitting the events after the state change is intentional: YUNIKORN-3421 moved this work out of the FSM locks, and K8s events are informational. The tests should wait for the events instead of asserting right after the state check. The other event checks in the {{pkg/cache}} tests are not affected.
> refer CI failed: [https://github.com/apache/yunikorn-k8shim/actions/runs/37132359955/job/111365352798?pr=1098|https://github.com/apache/yunikorn-k8shim/actions/runs/37132359955/job/111365352798?pr=1098]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: dev-help@yunikorn.apache.org