summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests
diff options
context:
space:
mode:
authorJordi Olivares Provencio <jordi.olivares-provencio@mongodb.com>2022-06-01 16:35:17 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-01 17:12:39 +0000
commita5db05d955c38c241cb65fbc3039ec7835b5516f (patch)
tree140e25e4f0bdded6a01bfe4b2169f386878e5ede /src/mongo/dbtests
parent37e28d05ca12d2b3835bbe2145cbe258872e7ed6 (diff)
downloadmongo-a5db05d955c38c241cb65fbc3039ec7835b5516f.tar.gz
SERVER-66796 Make TicketHolder metrics independent from Impl
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r--src/mongo/dbtests/threadedtests.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/dbtests/threadedtests.cpp b/src/mongo/dbtests/threadedtests.cpp
index 2d0449856ab..a8132efb631 100644
--- a/src/mongo/dbtests/threadedtests.cpp
+++ b/src/mongo/dbtests/threadedtests.cpp
@@ -233,9 +233,11 @@ class TicketHolderWaits : public ThreadedTest<10> {
static const int rooms = 3;
public:
- TicketHolderWaits()
- : _hotel(rooms),
- _tickets(std::make_unique<SemaphoreTicketHolder>(_hotel._nRooms, nullptr)) {}
+ TicketHolderWaits() : _hotel(rooms) {
+ auto client = Client::getCurrent();
+ _tickets =
+ std::make_unique<SemaphoreTicketHolder>(_hotel._nRooms, client->getServiceContext());
+ }
private:
class Hotel {