Skip to content

Commit 13181b3

Browse files
committed
graceful shutdown in test
Signed-off-by: Spike Curtis <spike@coder.com>
1 parent 76d7ac7 commit 13181b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

provisionerd/provisionerd_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,9 @@ func TestProvisionerd(t *testing.T) {
10301030
}),
10311031
})
10321032
require.Condition(t, closedWithin(completeChan, testutil.WaitShort))
1033+
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitShort)
1034+
defer cancel()
1035+
require.NoError(t, server.Shutdown(ctx))
10331036
require.NoError(t, server.Close())
10341037
assert.Equal(t, ops[len(ops)-1], "CompleteJob")
10351038
assert.Contains(t, ops[0:len(ops)-1], "Log: Cleaning Up | ")

0 commit comments

Comments
 (0)