worker: fix data race in test
@@ -64,21 +64,14 @@ var _ = Describe("Beacon", func() {
})
Context("during registration", func() {
- var finishRegister chan error
-
BeforeEach(func() {
- finishRegister = make(chan error, 1)
-
fakeClient.RegisterStub = func(ctx context.Context, opts tsa.RegisterOptions) error {
opts.RegisteredFunc()
- select {
- case err := <-finishRegister:
- return err
- case <-ctx.Done():
+ <-ctx.Done()
+
return nil
}
- }
})
Describe("sending a signal", func() {
