Skip to content

Commit 73afab1

Browse files
committed
handle review comments
1 parent 51fdd55 commit 73afab1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/controller/job/job_controller_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2916,7 +2916,7 @@ func TestJobControllerMissingJobSucceedEvent(t *testing.T) {
29162916
// manually adding the just-created pod from fake clientset memory to informer cache because informer is not started.
29172917
// we are updating the pod status to succeeded which should update the job status to succeeded and remove the finalizer of the pod.
29182918
justCreatedPod := podList.(*v1.PodList).Items[0]
2919-
fmt.Printf("pod is %v\n", podList.(*v1.PodList).Items[0])
2919+
t.Logf("pod is %v\n", podList.(*v1.PodList).Items[0])
29202920
justCreatedPod.Status.Phase = v1.PodSucceeded
29212921
err = podIndexer.Add(&justCreatedPod)
29222922
if err != nil {
@@ -2948,7 +2948,7 @@ func TestJobControllerMissingJobSucceedEvent(t *testing.T) {
29482948
if err != nil {
29492949
t.Fatalf("Unexpected error when fetching pods %v", err)
29502950
}
2951-
fmt.Printf("pod is %v\n", podList.(*v1.PodList).Items[0])
2951+
t.Logf("pod is %v\n", podList.(*v1.PodList).Items[0])
29522952
updatedPod := podList.(*v1.PodList).Items[0]
29532953
updatedPod.Status.Phase = v1.PodSucceeded
29542954
err = podIndexer.Add(&updatedPod)
@@ -2969,7 +2969,7 @@ func TestJobControllerMissingJobSucceedEvent(t *testing.T) {
29692969
if err != nil {
29702970
t.Fatalf("Unexpected error when syncing jobs %v", err)
29712971
}
2972-
time.Sleep(time.Second)
2972+
time.Sleep(100 * time.Millisecond)
29732973

29742974
podList, err = clientSet.Tracker().List(
29752975
schema.GroupVersionResource{Version: "v1", Resource: "pods"},

0 commit comments

Comments
 (0)