Skip to content

Fix HTTP OTLPMetricExporter unit tests of max_export_batch_size to use real export #5035

@tammy-baylis-swi

Description

@tammy-baylis-swi

Describe your environment

OS: macOS
Python version: Python 3.12.5
SDK version: 1.41.0.dev0
API version: 1.41.0.dev0

What happened?

The HTTP OTLPMetricExporter unit tests of max_export_batch_size don't use real export and mock a lot of things, reducing developer confidence. They're also not the most readable

Steps to Reproduce

Read the current OTLPMetricExporter test_split_metric_* functions.

Expected Result

See as few mocks used as possible for batch export testing

Actual Result

Oops, export is mocked

Additional context

Requested in #5015 that I add HTTP OTLPMetricExporter test coverage for max_export_batch_size with non-mocked export. Related also to #4577 and #5014

Similar to #5031

Would you like to implement a fix?

None

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Labels

bugSomething isn't workingtests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions