Skip to content

Commit 4a0a093

Browse files
authored
Updating aws-c-* dependencies (aws#120)
* Updating submodules * Fixing HttpClientConnectionWithPendingAcquisitions test. * Updating aws-c-auth submodule to new version
1 parent 2e3ae39 commit 4a0a093

File tree

6 files changed

+16
-6
lines changed

6 files changed

+16
-6
lines changed

aws-common-runtime/aws-c-common

Submodule aws-c-common updated 49 files

tests/HttpClientConnectionManagerTest.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static int s_TestHttpClientConnectionWithPendingAcquisitions(struct aws_allocato
209209
}
210210
std::unique_lock<std::mutex> uniqueLock(semaphoreLock);
211211
semaphore.wait(uniqueLock, [&]() {
212-
return connections.size() + connectionsFailed >= connectionManagerOptions.MaxConnections;
212+
return connections.size() + connectionsFailed == connectionManagerOptions.MaxConnections;
213213
});
214214
}
215215

@@ -218,8 +218,18 @@ static int s_TestHttpClientConnectionWithPendingAcquisitions(struct aws_allocato
218218

219219
Vector<std::shared_ptr<Http::HttpClientConnection>> connectionsCpy = connections;
220220
connections.clear();
221+
connectionsFailed = 0;
221222

222223
connectionsCpy.clear();
224+
225+
/* Wait for the connection manager to try initiating the rest of the connections. */
226+
{
227+
std::unique_lock<std::mutex> uniqueLock(semaphoreLock);
228+
semaphore.wait(uniqueLock, [&]() {
229+
return connections.size() + connectionsFailed == connectionManagerOptions.MaxConnections;
230+
});
231+
}
232+
223233
{
224234
std::lock_guard<std::mutex> lockGuard(semaphoreLock);
225235
/* release should have given us more connections. */

0 commit comments

Comments
 (0)