Skip to content

Commit c24722f

Browse files
Fix the failed test. (#804)
Remove the old unused constructor. Resolves: OLPEDGE-1859 Signed-off-by: Mykhailo Kuchma <ext-mykhailo.kuchma@here.com>
1 parent bbc733d commit c24722f

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

olp-cpp-sdk-authentication/src/AuthenticationClient.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,6 @@ class AuthenticationClient::Impl final {
252252
using SignInUserCacheType =
253253
thread::Atomic<utils::LruCache<std::string, SignInUserResult>>;
254254

255-
/**
256-
* @brief Constructor
257-
* @param token_cache_limit Maximum number of tokens that will be cached.
258-
*/
259-
Impl(const std::string& authentication_server_url, size_t token_cache_limit);
260-
261255
/**
262256
* @brief Constructor
263257
* @param settings The authentication settings that can be used to configure
@@ -361,16 +355,6 @@ class AuthenticationClient::Impl final {
361355
mutable std::mutex token_mutex_;
362356
};
363357

364-
AuthenticationClient::Impl::Impl(const std::string& authentication_server_url,
365-
size_t token_cache_limit)
366-
: client_token_cache_(std::make_shared<SignInCacheType>(token_cache_limit)),
367-
user_token_cache_(
368-
std::make_shared<SignInUserCacheType>(token_cache_limit)),
369-
pending_requests_(std::make_shared<client::PendingRequests>()) {
370-
settings_.token_endpoint_url = authentication_server_url;
371-
settings_.token_cache_limit = token_cache_limit;
372-
}
373-
374358
AuthenticationClient::Impl::Impl(AuthenticationSettings settings)
375359
: client_token_cache_(
376360
std::make_shared<SignInCacheType>(settings.token_cache_limit)),

tests/functional/olp-cpp-sdk-authentication/AuthenticationClientTest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,8 @@ TEST_F(AuthenticationClientTest, NetworkProxySettings) {
628628
proxy_settings.WithType(olp::http::NetworkProxySettings::Type::SOCKS4);
629629
settings.network_proxy_settings = proxy_settings;
630630

631-
auto client = std::make_unique<AuthenticationClient>(settings);
631+
// Override the default client with a new one with proxy.
632+
client_ = std::make_unique<AuthenticationClient>(settings);
632633

633634
std::time_t now;
634635
auto response = SignInClient(credentials, now, kExpiryTime);

0 commit comments

Comments
 (0)