Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion provisionerd/provisionerd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,15 @@ func TestProvisionerd(t *testing.T) {
didLog atomic.Bool
didAcquireJob atomic.Bool
)
var complete sync.Once
completeChan := make(chan struct{})
closer := createProvisionerd(t, func(ctx context.Context) (proto.DRPCProvisionerDaemonClient, error) {
return createProvisionerDaemonClient(t, provisionerDaemonTestServer{
acquireJob: func(ctx context.Context, _ *proto.Empty) (*proto.AcquiredJob, error) {
if didAcquireJob.Load() {
close(completeChan)
complete.Do(func() {
close(completeChan)
})
return &proto.AcquiredJob{}, nil
}
didAcquireJob.Store(true)
Expand Down