Skip to content

Commit

Permalink
fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Apr 11, 2022
1 parent c4ffe77 commit 17a3b7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions exporters/etw/test/etw_provider_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ TEST(ETWProvider, ProviderIsRegisteredSuccessfully)

bool registered = etw.is_registered(providerName);
ASSERT_TRUE(registered);
etw.close(handle);
}

TEST(ETWProvider, ProviderIsNotRegisteredSuccessfully)
Expand Down Expand Up @@ -46,15 +47,15 @@ TEST(ETWProvider, CheckOpenGUIDDataSuccessfully)
auto guidStrName = uuid_name.to_string();

ASSERT_STREQ(guidStrHandle.c_str(), guidStrName.c_str());
etw.close(handle);
}

TEST(ETWProvider, CheckCloseSuccess)
{
std::string providerName = "OpenTelemetry-ETW-Provider";

static ETWProvider etw;
auto handle = etw.open(providerName.c_str());

auto handle = etw.open(providerName.c_str(), ETWProvider::EventFormat::ETW_MANIFEST);
auto result = etw.close(handle);
ASSERT_NE(result, etw.STATUS_ERROR);
ASSERT_FALSE(etw.is_registered(providerName));
Expand Down

0 comments on commit 17a3b7a

Please sign in to comment.