Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Aug 15, 2022
1 parent 9eed500 commit a1a2634
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sdk/test/metrics/meter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ void asyc_generate_measurements(opentelemetry::metrics::ObserverResult observer,

TEST(MeterTest, BasicAsyncTests)
{
MetricReader *metricReaderPtr = nullptr;
auto meter = InitMeter(&metricReaderPtr);
auto observable_counter = meter->CreateLongObservableCounter("observable_counter");
MetricReader *metric_reader_ptr = nullptr;
auto meter = InitMeter(&metric_reader_ptr);
auto observable_counter = meter->CreateLongObservableCounter("observable_counter");
observable_counter->AddCallback(asyc_generate_measurements, nullptr);

size_t count = 0;
metricReaderPtr->Collect([&count](ResourceMetrics &metric_data) {
metric_reader_ptr->Collect([&count](ResourceMetrics &metric_data) {
EXPECT_EQ(metric_data.scope_metric_data_.size(), 1);
if (metric_data.scope_metric_data_.size())
{
Expand Down

0 comments on commit a1a2634

Please sign in to comment.