Skip to content

Commit fa9bd72

Browse files
author
Benjamin Reed
authored
Prefer greater than duration comparisons
1 parent b6a274f commit fa9bd72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testctrl/svc/orch/executor_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func TestKubeExecutorProvision(t *testing.T) {
128128
}()
129129

130130
ctx, cancel := context.WithCancel(context.TODO())
131-
if tc.ctxTimeout != 0 {
131+
if tc.ctxTimeout > 0 {
132132
ctx, _ = context.WithTimeout(ctx, tc.ctxTimeout)
133133
}
134134
defer cancel()
@@ -229,7 +229,7 @@ func TestKubeExecutorMonitor(t *testing.T) {
229229
}()
230230

231231
ctx, cancel := context.WithCancel(context.TODO())
232-
if tc.ctxTimeout != 0 {
232+
if tc.ctxTimeout > 0 {
233233
ctx, _ = context.WithTimeout(ctx, tc.ctxTimeout)
234234
}
235235
defer cancel()

0 commit comments

Comments
 (0)