@@ -639,25 +639,25 @@ func (t *T) createTestClient() {
639
639
// Setup command monitor
640
640
var customMonitor = clientOpts .Monitor
641
641
clientOpts .SetMonitor (& event.CommandMonitor {
642
- Started : func (_ context.Context , cse * event.CommandStartedEvent ) {
642
+ Started : func (ctx context.Context , cse * event.CommandStartedEvent ) {
643
643
if customMonitor != nil && customMonitor .Started != nil {
644
- customMonitor .Started (context . Background () , cse )
644
+ customMonitor .Started (ctx , cse )
645
645
}
646
646
t .monitorLock .Lock ()
647
647
defer t .monitorLock .Unlock ()
648
648
t .started = append (t .started , cse )
649
649
},
650
- Succeeded : func (_ context.Context , cse * event.CommandSucceededEvent ) {
650
+ Succeeded : func (ctx context.Context , cse * event.CommandSucceededEvent ) {
651
651
if customMonitor != nil && customMonitor .Succeeded != nil {
652
- customMonitor .Succeeded (context . Background () , cse )
652
+ customMonitor .Succeeded (ctx , cse )
653
653
}
654
654
t .monitorLock .Lock ()
655
655
defer t .monitorLock .Unlock ()
656
656
t .succeeded = append (t .succeeded , cse )
657
657
},
658
- Failed : func (_ context.Context , cfe * event.CommandFailedEvent ) {
658
+ Failed : func (ctx context.Context , cfe * event.CommandFailedEvent ) {
659
659
if customMonitor != nil && customMonitor .Failed != nil {
660
- customMonitor .Failed (context . Background () , cfe )
660
+ customMonitor .Failed (ctx , cfe )
661
661
}
662
662
t .monitorLock .Lock ()
663
663
defer t .monitorLock .Unlock ()
0 commit comments