mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
Make sure resoruces will be cleaned up when initializing error
Signed-off-by: Kante Yin <kerthcet@gmail.com>
This commit is contained in:
parent
5d9d06aa47
commit
014be8444a
@ -2556,6 +2556,8 @@ func initTestSchedulerForFrameworkTest(t *testing.T, testCtx *testutils.TestCont
|
||||
|
||||
if nodeCount > 0 {
|
||||
if _, err := createAndWaitForNodesInCache(testCtx, "test-node", st.MakeNode(), nodeCount); err != nil {
|
||||
// Make sure to cleanup the resources when initializing error.
|
||||
testutils.CleanupTest(t, testCtx)
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user