Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exporters/otlp/test/otlp_http_exporter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ TEST_F(OtlpHttpExporterTestPeer, ExportJsonIntegrationTest)
report_trace_id.assign(trace_id_hex, sizeof(trace_id_hex));
}

ASSERT_TRUE(waitForRequests(8, old_count + 1));
ASSERT_TRUE(waitForRequests(30, old_count + 1));
auto check_json = received_requests_json_.back();
auto resource_span = *check_json["resource_spans"].begin();
auto instrumentation_library_span = *resource_span["instrumentation_library_spans"].begin();
Expand Down Expand Up @@ -310,7 +310,7 @@ TEST_F(OtlpHttpExporterTestPeer, ExportBinaryIntegrationTest)
report_trace_id.assign(reinterpret_cast<char *>(trace_id_binary), sizeof(trace_id_binary));
}

ASSERT_TRUE(waitForRequests(8, old_count + 1));
ASSERT_TRUE(waitForRequests(30, old_count + 1));

auto received_trace_id = received_requests_binary_.back()
.resource_spans(0)
Expand Down
4 changes: 2 additions & 2 deletions exporters/otlp/test/otlp_http_log_exporter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ TEST_F(OtlpHttpLogExporterTestPeer, ExportJsonIntegrationTest)
report_span_id.assign(span_id_hex, sizeof(span_id_hex));
}

ASSERT_TRUE(waitForRequests(8, old_count + 1));
ASSERT_TRUE(waitForRequests(30, old_count + 1));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting. We started with 2, then 8, and now 30. Didn't know it's that slow with Valgrind :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found otlp http client test under valgrind takes 6s most of the time. The //sdk/test/_metrics:metric_instrument_test take the longest time(almost 1minute). But sometime it takes more time to finish, maybe the CI node is busy at that time?

Copy link
Copy Markdown
Member

@lalitb lalitb Jan 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to increase the HTTP wait time as part of this PR if it's 6 secs most of the time even with valgrind? We should eventually remove the old metrics tests once new implementation is ready.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This failure is happening every now and then in my PR recently.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can merge this PR if that's the case. If the problem persists, we can think of mocking the HTTP responses instead of using a real server.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

auto check_json = received_requests_json_.back();
auto resource_logs = *check_json["resource_logs"].begin();
auto instrumentation_library_span = *resource_logs["instrumentation_library_logs"].begin();
Expand Down Expand Up @@ -340,7 +340,7 @@ TEST_F(OtlpHttpLogExporterTestPeer, ExportBinaryIntegrationTest)
report_span_id.assign(reinterpret_cast<const char *>(span_id_bin), sizeof(span_id_bin));
}

ASSERT_TRUE(waitForRequests(8, old_count + 1));
ASSERT_TRUE(waitForRequests(30, old_count + 1));
auto received_log =
received_requests_binary_.back().resource_logs(0).instrumentation_library_logs(0).logs(0);
EXPECT_EQ(received_log.trace_id(), report_trace_id);
Expand Down
5 changes: 3 additions & 2 deletions exporters/zipkin/test/zipkin_exporter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ TEST_F(ZipkinExporterTestPeer, ExportJsonIntegrationTest)
report_trace_id.assign(trace_id_hex, sizeof(trace_id_hex));
}

ASSERT_TRUE(waitForRequests(8, old_count + 1));
ASSERT_TRUE(waitForRequests(30, old_count + 1));
auto check_json = received_requests_json_.back();
auto trace_id_kv = check_json.at(0).find("traceId");
auto received_trace_id = trace_id_kv.value().get<std::string>();
Expand All @@ -256,7 +256,8 @@ TEST_F(ZipkinExporterTestPeer, ExportJsonIntegrationTest)
TEST_F(ZipkinExporterTestPeer, ShutdownTest)
{
auto mock_http_client = new MockHttpClient;
auto exporter = GetExporter(
// Leave a comment line here or different version of clang-format has a different result here
auto exporter = GetExporter(
std::shared_ptr<opentelemetry::ext::http::client::HttpClientSync>{mock_http_client});
auto recordable_1 = exporter->MakeRecordable();
recordable_1->SetName("Test span 1");
Expand Down
4 changes: 2 additions & 2 deletions ext/test/http/curl_http_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequest)
request->SetUri("get/");
GetEventHandler *handler = new GetEventHandler();
session->SendRequest(*handler);
ASSERT_TRUE(waitForRequests(1, 1));
ASSERT_TRUE(waitForRequests(30, 1));
session->FinishSession();
ASSERT_TRUE(handler->is_called_);
delete handler;
Expand All @@ -221,7 +221,7 @@ TEST_F(BasicCurlHttpTests, SendPostRequest)
request->AddHeader("Content-Type", "text/plain");
PostEventHandler *handler = new PostEventHandler();
session->SendRequest(*handler);
ASSERT_TRUE(waitForRequests(1, 1));
ASSERT_TRUE(waitForRequests(30, 1));
session->FinishSession();
ASSERT_TRUE(handler->is_called_);

Expand Down