Skip to content

Commit

Permalink
Whitespace cleanup in an otel-webserver-module mock
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-mccann committed Jul 15, 2024
1 parent d8d7532 commit e846291
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
12 changes: 3 additions & 9 deletions exporters/fluentd/test/trace/fluentd_recordable_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "opentelemetry/sdk/trace/simple_processor.h"
#include "opentelemetry/sdk/trace/span_data.h"
#include "opentelemetry/sdk/trace/tracer_provider.h"
#include "opentelemetry/sdk/trace/tracer_provider_factory.h"
#include "opentelemetry/trace/provider.h"

#include "opentelemetry/sdk/trace/exporter.h"
Expand Down Expand Up @@ -381,15 +380,10 @@ TEST(FluentdExporter, SendTraceEvents) {
auto processor = std::unique_ptr<SpanProcessor>(
new sdktrace::SimpleSpanProcessor(std::move(exporter)));

#ifdef OPENTELEMETRY_DEPRECATED_SDK_FACTORY
nostd::shared_ptr<trace::TracerProvider> provider =
sdktrace::TracerProviderFactory::Create(std::move(processor));
#else
nostd::shared_ptr<sdktrace::TracerProvider> provider =
sdktrace::TracerProviderFactory::Create(std::move(processor));
#endif /* OPENTELEMETRY_DEPRECATED_SDK_FACTORY */
auto provider = std::shared_ptr<sdktrace::TracerProvider>(
new TracerProvider(std::move(processor)));

nostd::shared_ptr<trace::TracerProvider> api_provider = provider;
std::shared_ptr<trace::TracerProvider> api_provider = provider;
// Set the global trace provider
opentelemetry::trace::Provider::SetTracerProvider(api_provider);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ class MockPropagator : public context::propagation::TextMapPropagator
const context::Context &context) noexcept override {
InjectImpl(carrier);
}

MOCK_METHOD(void, ExtractImpl, (const context::propagation::TextMapCarrier &carrier));
MOCK_METHOD(void, InjectImpl, (context::propagation::TextMapCarrier &carrier));
MOCK_METHOD(bool, Fields, (nostd::function_ref<bool(nostd::string_view)> callback),
MOCK_METHOD(bool, Fields, (nostd::function_ref<bool(nostd::string_view)> callback),
(const, noexcept, override));
};

Expand Down

0 comments on commit e846291

Please sign in to comment.