diff options
author | Louis Williams <louis.williams@mongodb.com> | 2019-04-12 14:06:31 -0400 |
---|---|---|
committer | Louis Williams <louis.williams@mongodb.com> | 2019-04-12 14:10:55 -0400 |
commit | 32da14821b53da78b1316e46905b1babe22dcf74 (patch) | |
tree | c6747a522cfcc3ffe20214ce5060ee79fcca578b /src/mongo/db/transaction_participant_test.cpp | |
parent | 57d32f66ca23e0f4a49894e65b8472b5eabe00da (diff) | |
download | mongo-32da14821b53da78b1316e46905b1babe22dcf74.tar.gz |
SERVER-40105 fix unittests
Diffstat (limited to 'src/mongo/db/transaction_participant_test.cpp')
-rw-r--r-- | src/mongo/db/transaction_participant_test.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/mongo/db/transaction_participant_test.cpp b/src/mongo/db/transaction_participant_test.cpp index b933e52b341..c120bdf6837 100644 --- a/src/mongo/db/transaction_participant_test.cpp +++ b/src/mongo/db/transaction_participant_test.cpp @@ -2263,8 +2263,8 @@ TEST_F(TransactionsMetricsTest, AdditiveMetricsObjectsShouldBeAddedTogetherUponS CurOp::get(opCtx())->debug().additiveMetrics.keysDeleted = 0; txnParticipant.getSingleTransactionStatsForTest() .getOpDebug() - ->additiveMetrics.prepareReadConflicts = 5; - CurOp::get(opCtx())->debug().additiveMetrics.prepareReadConflicts = 4; + ->additiveMetrics.prepareReadConflicts.store(5); + CurOp::get(opCtx())->debug().additiveMetrics.prepareReadConflicts.store(4); auto additiveMetricsToCompare = txnParticipant.getSingleTransactionStatsForTest().getOpDebug()->additiveMetrics; @@ -2301,11 +2301,12 @@ TEST_F(TransactionsMetricsTest, AdditiveMetricsObjectsShouldBeAddedTogetherUponC CurOp::get(opCtx())->debug().additiveMetrics.keysInserted = 1; txnParticipant.getSingleTransactionStatsForTest() .getOpDebug() - ->additiveMetrics.prepareReadConflicts = 0; - CurOp::get(opCtx())->debug().additiveMetrics.prepareReadConflicts = 0; - txnParticipant.getSingleTransactionStatsForTest().getOpDebug()->additiveMetrics.writeConflicts = - 6; - CurOp::get(opCtx())->debug().additiveMetrics.writeConflicts = 3; + ->additiveMetrics.prepareReadConflicts.store(0); + CurOp::get(opCtx())->debug().additiveMetrics.prepareReadConflicts.store(0); + txnParticipant.getSingleTransactionStatsForTest() + .getOpDebug() + ->additiveMetrics.writeConflicts.store(6); + CurOp::get(opCtx())->debug().additiveMetrics.writeConflicts.store(3); auto additiveMetricsToCompare = txnParticipant.getSingleTransactionStatsForTest().getOpDebug()->additiveMetrics; @@ -2340,9 +2341,10 @@ TEST_F(TransactionsMetricsTest, AdditiveMetricsObjectsShouldBeAddedTogetherUponA CurOp::get(opCtx())->debug().additiveMetrics.keysInserted = 1; txnParticipant.getSingleTransactionStatsForTest().getOpDebug()->additiveMetrics.keysDeleted = 6; CurOp::get(opCtx())->debug().additiveMetrics.keysDeleted = 0; - txnParticipant.getSingleTransactionStatsForTest().getOpDebug()->additiveMetrics.writeConflicts = - 3; - CurOp::get(opCtx())->debug().additiveMetrics.writeConflicts = 3; + txnParticipant.getSingleTransactionStatsForTest() + .getOpDebug() + ->additiveMetrics.writeConflicts.store(3); + CurOp::get(opCtx())->debug().additiveMetrics.writeConflicts.store(3); auto additiveMetricsToCompare = txnParticipant.getSingleTransactionStatsForTest().getOpDebug()->additiveMetrics; @@ -2770,8 +2772,8 @@ void setupAdditiveMetrics(const int metricValue, OperationContext* opCtx) { CurOp::get(opCtx)->debug().additiveMetrics.ndeleted = metricValue; CurOp::get(opCtx)->debug().additiveMetrics.keysInserted = metricValue; CurOp::get(opCtx)->debug().additiveMetrics.keysDeleted = metricValue; - CurOp::get(opCtx)->debug().additiveMetrics.prepareReadConflicts = metricValue; - CurOp::get(opCtx)->debug().additiveMetrics.writeConflicts = metricValue; + CurOp::get(opCtx)->debug().additiveMetrics.prepareReadConflicts.store(metricValue); + CurOp::get(opCtx)->debug().additiveMetrics.writeConflicts.store(metricValue); } /* |