From d0421fa9c3eb64b12db1cd6ae8cd353e08a09ed4 Mon Sep 17 00:00:00 2001 From: Shingo Omura Date: Tue, 4 Aug 2020 22:46:22 +0900 Subject: [PATCH] Fix TestScorePlugin: numScore should be accessed with atomic.LoadInt32 --- test/integration/scheduler/framework_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/scheduler/framework_test.go b/test/integration/scheduler/framework_test.go index c3613f2581a7..fa9da2c7e4a4 100644 --- a/test/integration/scheduler/framework_test.go +++ b/test/integration/scheduler/framework_test.go @@ -797,7 +797,7 @@ func TestScorePlugin(t *testing.T) { } } - if scorePlugin.numScoreCalled == 0 { + if numScoreCalled := atomic.LoadInt32(&scorePlugin.numScoreCalled); numScoreCalled == 0 { t.Errorf("Expected the score plugin to be called.") }