Skip to content

Commit

Permalink
Add check for setting HasProbeCompleted
Browse files Browse the repository at this point in the history
Signed-off-by: nagesh bansal <[email protected]>
  • Loading branch information
Nageshbansal committed Dec 15, 2023
1 parent 9ec39bd commit d17a02d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/probe/cmdprobe.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ loop:
select {
case <-chaosDetails.ProbeContext.Ctx.Done():
log.Info("Chaos Execution completed. Stopping Probes")
for index := range chaosresult.ProbeDetails {
if chaosresult.ProbeDetails[index].Name == probe.Name {
chaosresult.ProbeDetails[index].HasProbeCompleted = true
}
}
break loop
default:
err := triggerInlineCmdProbe(probe, chaosresult)
Expand Down
5 changes: 5 additions & 0 deletions pkg/probe/k8sprobe.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ loop:
select {
case <-chaosDetails.ProbeContext.Ctx.Done():
log.Info("Chaos Execution completed. Stopping Probes")
for index := range chaosresult.ProbeDetails {
if chaosresult.ProbeDetails[index].Name == probe.Name {
chaosresult.ProbeDetails[index].HasProbeCompleted = true
}
}
break loop

default:
Expand Down
5 changes: 5 additions & 0 deletions pkg/probe/promProbe.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ loop:
select {
case <-chaosDetails.ProbeContext.Ctx.Done():
log.Info("Chaos Execution completed. Stopping Probes")
for index := range chaosresult.ProbeDetails {
if chaosresult.ProbeDetails[index].Name == probe.Name {
chaosresult.ProbeDetails[index].HasProbeCompleted = true
}
}
break loop
default:
err = triggerPromProbe(probe, chaosresult)
Expand Down

0 comments on commit d17a02d

Please sign in to comment.