Skip to content

Commit 1d47dd1

Browse files
committed
Address PR comments.
1 parent 26484e8 commit 1d47dd1

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

pkg/internal/controller/controller.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,7 @@ func (c *Controller[request]) startEventSourcesAndQueueLocked(ctx context.Contex
337337
defer close(sourceStartErrChan)
338338
log.Info("Starting EventSource")
339339

340-
q := c.Queue
341-
if err := watch.Start(ctx, q); err != nil {
340+
if err := watch.Start(ctx, c.Queue); err != nil {
342341
sourceStartErrChan <- err
343342
return
344343
}

pkg/leaderelection/fake/leader_election.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ type ControllableResourceLockInterface interface {
3939

4040
// BlockLeaderElection blocks the leader election process when called. It will not be unblocked
4141
// until UnblockLeaderElection is called.
42-
// Not thread safe.
4342
BlockLeaderElection()
4443

45-
// UnblockLeaderElection unblocks the leader election. Not thread safe.
44+
// UnblockLeaderElection unblocks the leader election.
4645
UnblockLeaderElection()
4746
}
4847

pkg/manager/manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ var _ = Describe("manger.Manager", func() {
19971997
By("Unblocking leader election")
19981998
resourceLockWithHooks.UnblockLeaderElection()
19991999

2000-
By("Waiting for the leader election runnable to be executed without leader election being won")
2000+
By("Waiting for the leader election runnable to be executed after leader election was won")
20012001
<-m.Elected()
20022002
Expect(<-runnableExecutionOrderChan).To(Equal(leaderElectionRunnableName))
20032003
})

0 commit comments

Comments
 (0)