@@ -527,23 +527,24 @@ class MockLookupService : public BinaryProtoLookupService {
527527};
528528
529529TEST (LookupServiceTest, testAfterClientShutdown) {
530- auto client = std::make_shared<ClientImpl>(
530+ auto client = PulsarFriend::newClientFromImpl ( std::make_shared<ClientImpl>(
531531 " pulsar://localhost:6650" , ClientConfiguration{},
532532 [](const ServiceInfo& serviceInfo, const ClientConfiguration&, ConnectionPool& pool) {
533533 return std::make_shared<MockLookupService>(serviceInfo, pool, ClientConfiguration{});
534- });
534+ }));
535+
535536 std::promise<Result> promise;
536- client-> subscribeAsync (" lookup-service-test-after-client-shutdown" , " sub" , ConsumerConfiguration{},
537- [&promise](Result result, const Consumer&) { promise.set_value (result); });
537+ client. subscribeAsync (" lookup-service-test-after-client-shutdown" , " sub" , ConsumerConfiguration{},
538+ [&promise](Result result, const Consumer&) { promise.set_value (result); });
538539 // When shutdown is called, there is a pending lookup request due to the 1st lookup is failed in
539540 // MockLookupService. Verify shutdown will cancel it and return ResultDisconnected.
540- client-> shutdown ();
541+ client. shutdown ();
541542 EXPECT_EQ (ResultDisconnected, promise.get_future ().get ());
542543
543544 // A new subscribeAsync call will fail immediately in the current thread
544545 Result result = ResultOk;
545- client-> subscribeAsync (" lookup-service-test-retry-after-destroyed" , " sub" , ConsumerConfiguration{},
546- [&result](Result innerResult, const Consumer&) { result = innerResult; });
546+ client. subscribeAsync (" lookup-service-test-retry-after-destroyed" , " sub" , ConsumerConfiguration{},
547+ [&result](Result innerResult, const Consumer&) { result = innerResult; });
547548 EXPECT_EQ (ResultAlreadyClosed, result);
548549}
549550
0 commit comments