Skip to content

Commit

Permalink
[chore] move mezmo exporter to generated lifecycle tests (#30537)
Browse files Browse the repository at this point in the history
Relates to
#27849

---------

Co-authored-by: Antoine Toulme <[email protected]>
  • Loading branch information
Frapschen and atoulme committed Feb 28, 2024
1 parent 9cb4613 commit 4e0b21c
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 4e0b21c

Please sign in to comment.