Skip to content

[TEST] Test failure in OtlpHttpExporterTestPeer.ExportJsonIntegrationTestSync #3721

@marcalff

Description

@marcalff
[ RUN      ] OtlpHttpExporterTestPeer.ExportJsonIntegrationTestSync
exporters/otlp/test/otlp_http_exporter_test.cc:173: Failure
Mock function called more times than expected - returning directly.
    Function call: SendRequest((ptr = 0x7f65540106a0, value = 8-byte object <18-8A E1-5E 65-7F 00-00>))
         Expected: to be called once
           Actual: called twice - over-saturated and active

-- Test timed out at 2025-10-27 17:08:13 UTC --

The test exports 2 spans.
I suspect the batch record processor triggered an export between the two spans, leading to 2 exports.

Possible fix: replace WillOnce() with Times Between (1, 2), to account for 1 or 2 exports.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions