Skip to content

Commit

Permalink
Try to fix unmounting of BPF FS during integration tests (#1205)
Browse files Browse the repository at this point in the history
* Try to fix unmounting of BPF FS during integration tests

* make beyla graph to exit immediately after context cancellation
  • Loading branch information
mariomac authored Sep 27, 2024
1 parent 9d41b5c commit 0130316
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/internal/pipe/instrumenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ type Instrumenter struct {
func (i *Instrumenter) Run(ctx context.Context) {
go i.internalMetrics.Start(ctx)
i.graph.Start()
<-i.graph.Done()
// run until either the graph is finished or the context is cancelled
select {
case <-i.graph.Done():
case <-ctx.Done():
}
}

// spanPtrPromGetters adapts the invocation of SpanPromGetters to work with a request.Span value
Expand Down

0 comments on commit 0130316

Please sign in to comment.