Skip to content

Commit

Permalink
fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
markdroth committed Aug 26, 2024
1 parent 8b77b62 commit 2476329
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/core/security/credentials_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2460,8 +2460,11 @@ class TokenFetcherCredentialsTest : public ::testing::Test {
};

void SetUp() override {
event_engine_ = std::make_shared<FuzzingEventEngine>(
FuzzingEventEngine::Options(), fuzzing_event_engine::Actions());
grpc_timer_manager_set_start_threaded(false);
grpc_init();
creds_ = MakeRefCounted<TestTokenFetcherCredentials>(event_engine_);
}

void TearDown() override {
Expand All @@ -2480,11 +2483,8 @@ class TokenFetcherCredentialsTest : public ::testing::Test {
Slice::FromCopiedString(token), expiration);
}

std::shared_ptr<FuzzingEventEngine> event_engine_ =
std::make_shared<FuzzingEventEngine>(FuzzingEventEngine::Options(),
fuzzing_event_engine::Actions());
RefCountedPtr<TestTokenFetcherCredentials> creds_ =
MakeRefCounted<TestTokenFetcherCredentials>(event_engine_);
std::shared_ptr<FuzzingEventEngine> event_engine_;
RefCountedPtr<TestTokenFetcherCredentials> creds_;
};

TEST_F(TokenFetcherCredentialsTest, Basic) {
Expand Down Expand Up @@ -4491,6 +4491,7 @@ TEST_F(CredentialsTest, TestXdsCredentialsCompareFailure) {
class GcpServiceAccountIdentityCredentialsTest : public ::testing::Test {
protected:
void SetUp() override {
grpc_init();
g_http_status = 200;
g_audience = "";
g_token = nullptr;
Expand All @@ -4501,6 +4502,7 @@ class GcpServiceAccountIdentityCredentialsTest : public ::testing::Test {

void TearDown() override {
HttpRequest::SetOverride(nullptr, nullptr, nullptr);
grpc_shutdown_blocking();
}

static void ValidateHttpRequest(const grpc_http_request* request,
Expand Down

0 comments on commit 2476329

Please sign in to comment.