Skip to content

Commit

Permalink
Fix review nits
Browse files Browse the repository at this point in the history
  • Loading branch information
benhoyt committed Aug 2, 2023
1 parent 4cd9ab4 commit 6a43869
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions internals/overlord/servstate/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -989,13 +989,13 @@ func (s *S) TestOnCheckFailureRestartWhileRunning(c *C) {
s.manager.NotifyPlanChanged(checkMgr.PlanChanged)

// Tell service manager about check failures
checkFailed := make(chan int)
checkFailed := make(chan struct{})
checkMgr.NotifyCheckFailed(func(name string) {
// Control when the action should be applied
select {
case checkFailed <- 1:
case checkFailed <- struct{}{}:
case <-time.After(10 * time.Second):
panic("this test is broken")
panic("timed out waiting to send on check-failed channel")
}
s.manager.CheckFailed(name)
})
Expand Down Expand Up @@ -1083,13 +1083,13 @@ func (s *S) TestOnCheckFailureRestartDuringBackoff(c *C) {
s.manager.NotifyPlanChanged(checkMgr.PlanChanged)

// Tell service manager about check failures
checkFailed := make(chan int)
checkFailed := make(chan struct{})
checkMgr.NotifyCheckFailed(func(name string) {
// Control when the action should be applied
select {
case checkFailed <- 1:
case checkFailed <- struct{}{}:
case <-time.After(10 * time.Second):
panic("this test is broken")
panic("timed out waiting to send on check-failed channel")
}
s.manager.CheckFailed(name)
})
Expand Down Expand Up @@ -1172,13 +1172,13 @@ func (s *S) TestOnCheckFailureIgnore(c *C) {
s.manager.NotifyPlanChanged(checkMgr.PlanChanged)

// Tell service manager about check failures
checkFailed := make(chan int)
checkFailed := make(chan struct{})
checkMgr.NotifyCheckFailed(func(name string) {
// Control when the action should be applied
select {
case checkFailed <- 1:
case checkFailed <- struct{}{}:
case <-time.After(10 * time.Second):
panic("this test is broken")
panic("timed out waiting to send on check-failed channel")
}
s.manager.CheckFailed(name)
})
Expand Down Expand Up @@ -1248,13 +1248,13 @@ func (s *S) TestOnCheckFailureShutdown(c *C) {
s.manager.NotifyPlanChanged(checkMgr.PlanChanged)

// Tell service manager about check failures
checkFailed := make(chan int)
checkFailed := make(chan struct{})
checkMgr.NotifyCheckFailed(func(name string) {
// Control when the action should be applied
select {
case checkFailed <- 1:
case checkFailed <- struct{}{}:
case <-time.After(10 * time.Second):
panic("this test is broken")
panic("timed out waiting to send on check-failed channel")
}
s.manager.CheckFailed(name)
})
Expand Down

0 comments on commit 6a43869

Please sign in to comment.