From 7979414ed5fb842cc75e260549398b34912cdd31 Mon Sep 17 00:00:00 2001 From: shaloulcy <lcy041536@gmail.com> Date: Mon, 13 Jan 2025 11:56:10 +0800 Subject: [PATCH] scheduler: fix ReplaceQuotas ut Signed-off-by: shaloulcy <lcy041536@gmail.com> --- pkg/scheduler/plugins/elasticquota/quota_handler_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/scheduler/plugins/elasticquota/quota_handler_test.go b/pkg/scheduler/plugins/elasticquota/quota_handler_test.go index 09024b814..9af41b86a 100644 --- a/pkg/scheduler/plugins/elasticquota/quota_handler_test.go +++ b/pkg/scheduler/plugins/elasticquota/quota_handler_test.go @@ -346,6 +346,8 @@ func TestPlugin_ReplaceQuotas(t *testing.T) { assert.Nil(t, err) plugin := p.(*Plugin) + // ReplaceQuotas will conflict with QuotaEventHandler. sleep 1 seconds to avoid it. + time.Sleep(time.Second) plugin.ReplaceQuotas(quotas) plugin.groupQuotaManager.UpdateClusterTotalResource(createResourceList(1000, 1000))