Skip to content

Commit c06c255

Browse files
authored
[TEST] Fix ZipkinExporterTestPeer.ExportJsonIntegrationTest stability (open-telemetry#3760)
1 parent 16c7067 commit c06c255

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

exporters/zipkin/test/zipkin_exporter_test.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,10 @@ TEST_F(ZipkinExporterTestPeer, ExportJsonIntegrationTest)
157157
auto expected_url = nostd::string_view{"http://localhost:9411/api/v2/spans"};
158158

159159
EXPECT_CALL(*mock_http_client, Post(expected_url, _, IsValidMessage(report_trace_id), _, _))
160-
161-
.Times(Exactly(1))
160+
.Times(Between(1, 2))
161+
.WillOnce(Return(ByMove(ext::http::client::Result{
162+
std::unique_ptr<ext::http::client::Response>{new ext::http::client::curl::Response()},
163+
ext::http::client::SessionState::Response})))
162164
.WillOnce(Return(ByMove(ext::http::client::Result{
163165
std::unique_ptr<ext::http::client::Response>{new ext::http::client::curl::Response()},
164166
ext::http::client::SessionState::Response})));

0 commit comments

Comments
 (0)