@@ -38,21 +38,13 @@ func TestIdlerAndPriorityClass(t *testing.T) {
3838 podsToIdle := prepareWorkloads (t , await .Member1 (), idler .Name , wait .WithSandboxPriorityClass ())
3939 podsNoise := prepareWorkloads (t , await .Member1 (), idlerNoise .Name , wait .WithSandboxPriorityClass ())
4040
41- // Create a Claw workload only in the dev namespace (the one being idled).
42- // Not added to prepareWorkloads to avoid exceeding the ClusterResourceQuota pod limit
43- // when workloads are created in multiple namespaces for the same user.
44- clawDeployment := createClaw (t , memberAwait , "test-idler-claw" , idler .Name )
45- podsToIdle , err := memberAwait .WaitForPods (t , idler .Name , len (podsToIdle )+ int (* clawDeployment .Spec .Replicas ),
46- wait .PodRunning (), wait .WithPodLabel ("idler" , "idler" ), wait .WithSandboxPriorityClass ())
47- require .NoError (t , err )
48-
4941 // Create more noise pods in non-user namespace
5042 memberAwait .CreateNamespace (t , "workloads-noise" )
5143 externalNsPodsNoise := prepareWorkloads (t , await .Member1 (), "workloads-noise" , wait .WithOriginalPriorityClass ())
5244
5345 // Set a short timeout for one of the idler to trigger pod idling
5446 // The idler is currently updating its status since it's already been idling the pods. So we need to keep trying to update.
55- idler , err = wait .For (t , memberAwait .Awaitility , & toolchainv1alpha1.Idler {}).
47+ idler , err : = wait .For (t , memberAwait .Awaitility , & toolchainv1alpha1.Idler {}).
5648 Update (idler .Name , memberAwait .Namespace , func (i * toolchainv1alpha1.Idler ) {
5749 i .Spec .TimeoutSeconds = 5
5850 })
@@ -182,6 +174,10 @@ func prepareWorkloads(t *testing.T, memberAwait *wait.MemberAwaitility, namespac
182174 aapDeployment := createAAP (t , memberAwait , "test-idler-aap" , namespace )
183175 n = n + int (* aapDeployment .Spec .Replicas )
184176
177+ // Create a Claw resource
178+ clawDeployment := createClaw (t , memberAwait , "test-idler-claw" , namespace )
179+ n = n + int (* clawDeployment .Spec .Replicas )
180+
185181 // Create a DataVolume resource with manual PVC and Pod
186182 createDataVolume (t , memberAwait , "test-idler-datavolume" , namespace )
187183 n = n + 1
0 commit comments