Skip to content

Commit

Permalink
[chore] move mezmo exporter to generated lifecycle tests (open-teleme…
Browse files Browse the repository at this point in the history
…try#30537)

Relates to
open-telemetry#27849

---------

Co-authored-by: Antoine Toulme <antoine@lunar-ocean.com>
  • Loading branch information
2 people authored and XinRanZhAWS committed Mar 13, 2024
1 parent cbe7ab1 commit d6a5b12
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 0 deletions.
5 changes: 5 additions & 0 deletions exporter/mezmoexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ func (m *mezmoExporter) start(_ context.Context, host component.Host) (err error
}

func (m *mezmoExporter) stop(context.Context) (err error) {
if m.client == nil {
return nil
}
m.wg.Wait()
m.client.CloseIdleConnections()
m.client = nil
return nil
}

Expand Down
94 changes: 94 additions & 0 deletions exporter/mezmoexporter/generated_component_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions exporter/mezmoexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.21

require (
github.com/cenkalti/backoff/v4 v4.2.1
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.92.0
github.com/stretchr/testify v1.8.4
go.opentelemetry.io/collector/component v0.95.0
go.opentelemetry.io/collector/config/confighttp v0.95.0
Expand Down Expand Up @@ -79,3 +80,11 @@ retract (
v0.76.1
v0.65.0
)

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal

replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil => ../../pkg/pdatautil

replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest

replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => ../../pkg/golden
5 changes: 5 additions & 0 deletions exporter/mezmoexporter/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ status:
distributions: [contrib]
codeowners:
active: [dashpole, billmeyer, gjanco]

tests:
config:
disable_keep_alives: true
expect_consumer_error: true

0 comments on commit d6a5b12

Please sign in to comment.