File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -738,6 +738,9 @@ func TestRun(t *testing.T) {
738738 MockAgent : & MockAgent {
739739 ServicesFunc : func () (map [string ]* api.AgentService , error ) {
740740 updateServiceTagsCalled .Add (1 )
741+ if updateServiceTagsCalled .Load () == 2 {
742+ return nil , fmt .Errorf ("enter error" )
743+ }
741744 return map [string ]* api.AgentService {
742745 "test-service" : {
743746 ID : "test-service" ,
@@ -758,7 +761,7 @@ func TestRun(t *testing.T) {
758761 go tagit .Run (ctx )
759762
760763 // Allow some time to pass and then cancel the context
761- time .Sleep (250 * time .Millisecond ) // Adjust this duration as needed
764+ time .Sleep (350 * time .Millisecond ) // Adjust this duration as needed
762765 cancel ()
763766
764767 // Allow some time for the goroutine to react to the context cancellation
You can’t perform that action at this time.
0 commit comments