summaryrefslogtreecommitdiff
path: root/src/mongo/executor/connection_pool_test_fixture.cpp
diff options
context:
space:
mode:
authorGeorge Wangensteen <george.wangensteen@mongodb.com>2023-03-15 20:30:31 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-03-15 21:15:48 +0000
commit3eb6f1f4540a9315434341e447fd4b2830211ef6 (patch)
tree31e6e21cd1ba1893e3f17ea60bba9a5c440082df /src/mongo/executor/connection_pool_test_fixture.cpp
parentc366ca4663e78f7c72034ca6411d2ef65c134675 (diff)
downloadmongo-3eb6f1f4540a9315434341e447fd4b2830211ef6.tar.gz
SERVER-73610 Introduce Connection-Leasing from ConnectionPool and NetworkInterface
Diffstat (limited to 'src/mongo/executor/connection_pool_test_fixture.cpp')
-rw-r--r--src/mongo/executor/connection_pool_test_fixture.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/executor/connection_pool_test_fixture.cpp b/src/mongo/executor/connection_pool_test_fixture.cpp
index c83529ad482..bb98af43b54 100644
--- a/src/mongo/executor/connection_pool_test_fixture.cpp
+++ b/src/mongo/executor/connection_pool_test_fixture.cpp
@@ -238,6 +238,11 @@ Date_t PoolImpl::now() {
}
void PoolImpl::setNow(Date_t now) {
+ if (_now) {
+ // If we're not initializing the virtual clock, advance the fast clock source as well.
+ Milliseconds diff = now - *_now;
+ _fastClockSource.advance(diff);
+ }
_now = now;
TimerImpl::fireIfNecessary();
}