diff options
author | Justin Seyster <justin.seyster@mongodb.com> | 2019-06-13 12:47:52 -0400 |
---|---|---|
committer | Justin Seyster <justin.seyster@mongodb.com> | 2019-06-14 18:31:40 -0400 |
commit | b3c26131f6ab3f919beca658341e737de5d45683 (patch) | |
tree | 60d6fed905f04a5fd2e40d5e4050490760d28c67 /buildscripts/resmokeconfig/suites | |
parent | a368e90685fdaa5d855ecd54769f5ca0c09d4378 (diff) | |
download | mongo-b3c26131f6ab3f919beca658341e737de5d45683.tar.gz |
SERVER-41183 Add test suites for change streams with transactions
Diffstat (limited to 'buildscripts/resmokeconfig/suites')
3 files changed, 181 insertions, 0 deletions
diff --git a/buildscripts/resmokeconfig/suites/change_streams_multi_stmt_txn_mongos_passthrough.yml b/buildscripts/resmokeconfig/suites/change_streams_multi_stmt_txn_mongos_passthrough.yml new file mode 100644 index 00000000000..ff7c8170176 --- /dev/null +++ b/buildscripts/resmokeconfig/suites/change_streams_multi_stmt_txn_mongos_passthrough.yml @@ -0,0 +1,66 @@ +test_kind: js_test + +selector: + roots: + - jstests/change_streams/**/*.js + exclude_files: + # Parallel Shell - we do not signal the override to end a txn when a parallel shell closes. + - jstests/change_streams/only_wake_getmore_for_relevant_changes.js + exclude_with_any_tags: + # These tests would fail with "Cowardly refusing to override write concern of command: ..." + - assumes_write_concern_unchanged + # No need to use a passthrough to add transactions to a test that already has its own + # transactions. + - uses_transactions + # These tests make assumptions about change stream results that are no longer true once operations + # get bundled into transactions. + - change_stream_does_not_expect_txns + +executor: + archive: + hooks: + - CheckReplDBHash + - CheckReplOplogs + - ValidateCollections + config: + shell_options: + global_vars: + TestData: + networkErrorAndTxnOverrideConfig: + wrapCRUDinTransactions: true + # Enable the transactions passthrough. + eval: >- + var testingReplication = true; + load('jstests/libs/override_methods/enable_sessions.js'); + load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js'); + load('jstests/libs/override_methods/network_error_and_txn_override.js'); + readMode: commands + hooks: + # The CheckReplDBHash hook waits until all operations have replicated to and have been applied + # on the secondaries, so we run the ValidateCollections hook after it to ensure we're + # validating the entire contents of the collection. + - class: CheckReplOplogs + - class: CheckReplDBHash + - class: ValidateCollections + - class: CleanEveryN + n: 20 + fixture: + class: ShardedClusterFixture + # Use two shards to make sure we will only talk to the primary shard for the database and will + # not delay changes to wait for notifications or a clock advancement from other shards. + num_shards: 2 + mongos_options: + bind_ip_all: '' + set_parameters: + enableTestCommands: 1 + mongod_options: + bind_ip_all: '' + set_parameters: + enableTestCommands: 1 + periodicNoopIntervalSecs: 1 + writePeriodicNoops: true + num_rs_nodes_per_shard: 1 + # This test suite doesn't actually shard any collections, but enabling sharding will prevent + # read commands against non-existent databases from unconditionally returning a CursorId of 0. + enable_sharding: + - test diff --git a/buildscripts/resmokeconfig/suites/change_streams_multi_stmt_txn_passthrough.yml b/buildscripts/resmokeconfig/suites/change_streams_multi_stmt_txn_passthrough.yml new file mode 100644 index 00000000000..15730882c82 --- /dev/null +++ b/buildscripts/resmokeconfig/suites/change_streams_multi_stmt_txn_passthrough.yml @@ -0,0 +1,53 @@ +test_kind: js_test + +selector: + roots: + - jstests/change_streams/**/*.js + exclude_files: + # Parallel Shell - we do not signal the override to end a txn when a parallel shell closes. + - jstests/change_streams/only_wake_getmore_for_relevant_changes.js + exclude_with_any_tags: + # These tests would fail with "Cowardly refusing to override write concern of command: ..." + - assumes_write_concern_unchanged + # No need to use a passthrough to add transactions to a test that already has its own + # transactions. + - uses_transactions + # These tests make assumptions about change stream results that are no longer true once operations + # get bundled into transactions. + - change_stream_does_not_expect_txns + +executor: + archive: + hooks: + - CheckReplDBHash + - CheckReplOplogs + - ValidateCollections + config: + shell_options: + global_vars: + TestData: + networkErrorAndTxnOverrideConfig: + wrapCRUDinTransactions: true + # Enable the transactions passthrough. + eval: >- + var testingReplication = true; + load('jstests/libs/override_methods/enable_sessions.js'); + load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js'); + load('jstests/libs/override_methods/network_error_and_txn_override.js'); + readMode: commands + hooks: + # The CheckReplDBHash hook waits until all operations have replicated to and have been applied + # on the secondaries, so we run the ValidateCollections hook after it to ensure we're + # validating the entire contents of the collection. + - class: CheckReplOplogs + - class: CheckReplDBHash + - class: ValidateCollections + - class: CleanEveryN + n: 20 + fixture: + class: ReplicaSetFixture + mongod_options: + bind_ip_all: '' + set_parameters: + enableTestCommands: 1 + num_nodes: 1 diff --git a/buildscripts/resmokeconfig/suites/change_streams_multi_stmt_txn_sharded_collections_passthrough.yml b/buildscripts/resmokeconfig/suites/change_streams_multi_stmt_txn_sharded_collections_passthrough.yml new file mode 100644 index 00000000000..db182de7dac --- /dev/null +++ b/buildscripts/resmokeconfig/suites/change_streams_multi_stmt_txn_sharded_collections_passthrough.yml @@ -0,0 +1,62 @@ +test_kind: js_test + +selector: + roots: + - jstests/change_streams/**/*.js + exclude_files: + # Parallel Shell - we do not signal the override to end a txn when a parallel shell closes. + - jstests/change_streams/only_wake_getmore_for_relevant_changes.js + exclude_with_any_tags: + # These tests would fail with "Cowardly refusing to override write concern of command: ..." + - assumes_write_concern_unchanged + # No need to use a passthrough to add transactions to a test that already has its own + # transactions. + - uses_transactions + # These tests make assumptions about change stream results that are no longer true once operations + # get bundled into transactions. + - change_stream_does_not_expect_txns + +executor: + archive: + hooks: + - CheckReplDBHash + - CheckReplOplogs + - ValidateCollections + config: + shell_options: + global_vars: + TestData: + networkErrorAndTxnOverrideConfig: + wrapCRUDinTransactions: true + # Enable the transactions passthrough. + eval: >- + var testingReplication = true; + load('jstests/libs/override_methods/enable_sessions.js'); + load('jstests/libs/override_methods/txn_passthrough_cmd_massage.js'); + load('jstests/libs/override_methods/network_error_and_txn_override.js'); + readMode: commands + hooks: + # The CheckReplDBHash hook waits until all operations have replicated to and have been applied + # on the secondaries, so we run the ValidateCollections hook after it to ensure we're + # validating the entire contents of the collection. + - class: CheckReplOplogs + - class: CheckReplDBHash + - class: ValidateCollections + - class: CleanEveryN + n: 20 + fixture: + class: ShardedClusterFixture + mongos_options: + bind_ip_all: '' + set_parameters: + enableTestCommands: 1 + mongod_options: + bind_ip_all: '' + set_parameters: + enableTestCommands: 1 + writePeriodicNoops: 1 + periodicNoopIntervalSecs: 1 + num_rs_nodes_per_shard: 1 + num_shards: 2 + enable_sharding: + - test |