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