Skip to content

Commit

Permalink
Refactor by reordering statements
Browse files Browse the repository at this point in the history
  • Loading branch information
ungive committed Feb 19, 2025
1 parent cf6da30 commit 611e208
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/test/client_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1729,14 +1729,15 @@ TEST(SharedClient, OnDisconnectIsCalledWhenOneOfMultipleStartedClientsIsStopped)
TEST(SharedClient, OnFailedIsCalledWhenWrappedClientFails)
{
// Copied from FailsWhenMinCacheDurationIsSetAndServerDoesNotCacheResponses

ClientOptions options;
options.min_cache_duration = std::chrono::seconds{ 10 };
auto client = create_client(options, false);
auto s1 = std::make_shared<SharedClient>(client);
auto s2 = std::make_shared<SharedClient>(client);
client->inject_hello_modifier([](Hello& hello) {
hello.mutable_constraints()->set_cache_duration(0);
});
auto s1 = std::make_shared<SharedClient>(client);
auto s2 = std::make_shared<SharedClient>(client);
ExpectCalled c1, c2;
s1->on_failed(c1.get());
s2->on_failed(c2.get());
Expand Down

0 comments on commit 611e208

Please sign in to comment.