Skip to content

Commit

Permalink
Correct testcase of "retry"
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pli committed Feb 4, 2020
1 parent aee09da commit 446606e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func TestTaskRunRetry(t *testing.T) {
}
podNames[r.PodName] = struct{}{}
}
podNames[tr.Status.PodName] = struct{}{}
if len(tr.Status.RetriesStatus) != numRetries {
t.Errorf("TaskRun %q had %d retriesStatuses, want %d", tr.Name, len(tr.Status.RetriesStatus), numRetries)
}
Expand All @@ -107,9 +108,9 @@ func TestTaskRunRetry(t *testing.T) {
pods, err := c.KubeClient.Kube.CoreV1().Pods(namespace).List(metav1.ListOptions{})
if err != nil {
t.Fatalf("Failed to list Pods: %v", err)
} else if len(pods.Items) != numRetries {
} else if len(pods.Items) != numRetries+1 {
// TODO: Make this an error.
t.Logf("BUG: Found %d Pods, want %d", len(pods.Items), numRetries)
t.Logf("BUG: Found %d Pods, want %d", len(pods.Items), numRetries+1)
}
for _, p := range pods.Items {
if _, found := podNames[p.Name]; !found {
Expand Down

0 comments on commit 446606e

Please sign in to comment.