summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/idempotency_test_fixture.h
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2017-10-25 23:03:52 -0400
committerBenety Goh <benety@mongodb.com>2017-11-07 14:11:56 -0500
commita8b621d8a3ac790ac95d17323fe8b66558b3cb3f (patch)
tree5ac8bd81cc212fe7b056a459b84bc84a1c804b7c /src/mongo/db/repl/idempotency_test_fixture.h
parente37ad56eaad3c0d4c7c38af4ee06eaa1329426cd (diff)
downloadmongo-a8b621d8a3ac790ac95d17323fe8b66558b3cb3f.tar.gz
SERVER-31356 update the following unit tests to not mutate OplogEntry after construction
ChangeStreamStageTest SessionCatalogMigrationDestinationTest SessionCatalogMigrationSourceTest SessionHistoryIteratorTest SessionTest SyncTailTest WriteOpsRetryabilityTest
Diffstat (limited to 'src/mongo/db/repl/idempotency_test_fixture.h')
-rw-r--r--src/mongo/db/repl/idempotency_test_fixture.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mongo/db/repl/idempotency_test_fixture.h b/src/mongo/db/repl/idempotency_test_fixture.h
index e62315fee57..669944f8eb5 100644
--- a/src/mongo/db/repl/idempotency_test_fixture.h
+++ b/src/mongo/db/repl/idempotency_test_fixture.h
@@ -152,10 +152,17 @@ OplogEntry makeCreateIndexOplogEntry(OpTime opTime,
OplogEntry makeCommandOplogEntry(OpTime opTime, const NamespaceString& nss, const BSONObj& command);
-void appendSessionTransactionInfo(OplogEntry& entry,
- LogicalSessionId lsid,
- TxnNumber txnNum,
- StmtId stmtId);
+OplogEntry makeInsertDocumentOplogEntryWithSessionInfo(OpTime opTime,
+ const NamespaceString& nss,
+ const BSONObj& documentToInsert,
+ OperationSessionInfo info);
+
+OplogEntry makeInsertDocumentOplogEntryWithSessionInfoAndStmtId(OpTime opTime,
+ const NamespaceString& nss,
+ const BSONObj& documentToInsert,
+ LogicalSessionId lsid,
+ TxnNumber txnNum,
+ StmtId stmtId);
} // namespace repl
} // namespace mongo