Skip to content

Commit 2726bc3

Browse files
committed
Revert "Review: Add default case to all select block"
This reverts commit 4ff0cc7.
1 parent 70dbb48 commit 2726bc3

File tree

4 files changed

+0
-31
lines changed

4 files changed

+0
-31
lines changed

pkg/jobs/common_job_list_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ func TestCommonJobList_SelectedJobsProduceFiles(t *testing.T) {
5353
}
5454
case <-ctx.Done():
5555
t.Fatalf("job %s timed out", job.Name)
56-
57-
default:
58-
// No result yet, which is unexpected since we set a timeout above
59-
t.Fatalf("job %s did not return result", job.Name)
6056
}
6157
}
6258
}

pkg/jobs/ngx_job_list_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ func TestNGXJobList_ExecNginxT(t *testing.T) {
7373
}
7474
case <-time.After(time.Second):
7575
t.Fatal("job execution timed out")
76-
77-
default:
78-
t.Fatalf("job %s did not return result", job.Name)
7976
}
8077
}
8178

pkg/jobs/nic_job_list_test.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ func TestNICJobList_ExecJobs(t *testing.T) {
6969
}
7070
case <-time.After(time.Second):
7171
t.Errorf("Job %s timed out", job.Name)
72-
73-
default:
74-
t.Errorf("Job %s did not return result", job.Name)
7572
}
7673
}
7774
}
@@ -104,9 +101,6 @@ func TestNICJobList_CRDObjects(t *testing.T) {
104101
}
105102
case <-time.After(time.Second):
106103
t.Errorf("CRD job timed out")
107-
108-
default:
109-
t.Errorf("CRD job %s did not return result", job.Name)
110104
}
111105
}
112106
}
@@ -186,9 +180,6 @@ func TestNICJobList_CRDObjects_QueryFailure(t *testing.T) {
186180

187181
case <-ctx.Done():
188182
t.Fatal("CRD job timed out")
189-
190-
default:
191-
t.Fatalf("CRD job %s did not return result", crdJob.Name)
192183
}
193184
}
194185

@@ -497,9 +488,6 @@ func TestNICJobList_CommandExecutionFailure(t *testing.T) {
497488

498489
case <-ctx.Done():
499490
t.Fatalf("Job %s timed out", tt.jobName)
500-
501-
default:
502-
t.Fatalf("Job %s did not return result", tt.jobName)
503491
}
504492
})
505493
}
@@ -566,8 +554,5 @@ func TestNICJobList_CollectProductPlatformInfo_JSONMarshalFailure(t *testing.T)
566554

567555
case <-ctx.Done():
568556
t.Fatal("Job timed out")
569-
570-
default:
571-
t.Fatalf("Job %s did not return result", job.Name)
572557
}
573558
}

pkg/jobs/nim_job_list_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@ func TestNIMJobList_ExecJobs(t *testing.T) {
103103
}
104104
case <-time.After(2 * time.Second):
105105
t.Errorf("Job %s timed out", job.Name)
106-
107-
default:
108-
t.Errorf("Job %s did not return result", job.Name)
109106
}
110107
}
111108
}
@@ -138,9 +135,6 @@ func TestNIMJobList_ExcludeFlags(t *testing.T) {
138135
}
139136
case <-time.After(time.Second):
140137
t.Fatal("Job exec-clickhouse-data timed out")
141-
142-
default:
143-
t.Fatalf("Job %s did not return result", job.Name)
144138
}
145139
}
146140
}
@@ -158,9 +152,6 @@ func TestNIMJobList_ExcludeFlags(t *testing.T) {
158152
}
159153
case <-time.After(time.Second):
160154
t.Fatal("Job exec-dqlite-dump timed out")
161-
162-
default:
163-
t.Fatalf("Job %s did not return result", job.Name)
164155
}
165156
}
166157
}

0 commit comments

Comments
 (0)