diff options
author | Kyle Suarez <kyle.suarez@mongodb.com> | 2016-12-07 16:29:16 -0500 |
---|---|---|
committer | Kyle Suarez <kyle.suarez@mongodb.com> | 2017-04-24 16:15:48 -0400 |
commit | b0c108dfdc788b6f5128c580917eb18006403e30 (patch) | |
tree | 12ed8bcc97cdde2973130bf168138c5f6b842f37 | |
parent | 4c525d122ce859bf040a1da342c91e996d3f3ac5 (diff) | |
download | mongo-b0c108dfdc788b6f5128c580917eb18006403e30.tar.gz |
SERVER-26765 move tests in jstests/views to other suites
This eliminates the views and views_rs suites; views testing will be done in
other suites to allow them to be picked up in passthrough suites.
(cherry picked from commit 39bcdc6e6ef4980d6103ca0746ef1f4347aae841)
-rw-r--r-- | buildscripts/resmokeconfig/suites/sharding_last_stable_mongos_and_mixed_shards.yml | 3 | ||||
-rw-r--r-- | buildscripts/resmokeconfig/suites/views.yml | 19 | ||||
-rw-r--r-- | buildscripts/resmokeconfig/suites/views_rs.yml | 28 | ||||
-rw-r--r-- | etc/evergreen.yml | 162 | ||||
-rw-r--r-- | jstests/noPassthrough/durable_view_catalog.js (renamed from jstests/views/durable_view_catalog.js) | 0 | ||||
-rw-r--r-- | jstests/noPassthrough/views_feature_compatibility_version.js (renamed from jstests/views/views_feature_compatibility_version.js) | 0 | ||||
-rw-r--r-- | jstests/noPassthrough/views_legacy.js (renamed from jstests/views/views_legacy.js) | 5 | ||||
-rw-r--r-- | jstests/noPassthroughWithMongod/views_invalid.js (renamed from jstests/views/views_invalid.js) | 4 | ||||
-rw-r--r-- | jstests/replsets/initial_sync_views.js (renamed from jstests/views/initial_sync_views.js) | 1 | ||||
-rw-r--r-- | jstests/sharding/views.js (renamed from jstests/views/views_sharded.js) | 12 |
10 files changed, 24 insertions, 210 deletions
diff --git a/buildscripts/resmokeconfig/suites/sharding_last_stable_mongos_and_mixed_shards.yml b/buildscripts/resmokeconfig/suites/sharding_last_stable_mongos_and_mixed_shards.yml index 50cedbc98d6..f4c741badd4 100644 --- a/buildscripts/resmokeconfig/suites/sharding_last_stable_mongos_and_mixed_shards.yml +++ b/buildscripts/resmokeconfig/suites/sharding_last_stable_mongos_and_mixed_shards.yml @@ -92,6 +92,9 @@ selector: - jstests/sharding/linearizable_read_concern.js # Last stable 3.2 doesn't have the fix for SERVER-28447 - jstests/sharding/migration_critical_section_concurrency.js + # TODO (SERVER-27379): Cannot create views when featureCompatibilityVersion is 3.2. + # Unblacklist when the featureCompatibilityVersion is 3.4 or higher. + - jstests/sharding/views.js executor: js_test: diff --git a/buildscripts/resmokeconfig/suites/views.yml b/buildscripts/resmokeconfig/suites/views.yml deleted file mode 100644 index 9a497f0b7ca..00000000000 --- a/buildscripts/resmokeconfig/suites/views.yml +++ /dev/null @@ -1,19 +0,0 @@ -selector: - js_test: - roots: - - jstests/views/*.js - -executor: - js_test: - config: - shell_options: - readMode: commands - hooks: - - class: ValidateCollections - - class: CleanEveryN - n: 20 - fixture: - class: MongoDFixture - mongod_options: - set_parameters: - enableTestCommands: 1 diff --git a/buildscripts/resmokeconfig/suites/views_rs.yml b/buildscripts/resmokeconfig/suites/views_rs.yml deleted file mode 100644 index 8ddf5922b59..00000000000 --- a/buildscripts/resmokeconfig/suites/views_rs.yml +++ /dev/null @@ -1,28 +0,0 @@ -selector: - js_test: - roots: - - jstests/views/*.js - exclude_files: - # This test starts its own mongod's, so won't be replicated. - - jstests/views/durable_view_catalog.js - -executor: - js_test: - config: - shell_options: - eval: "testingReplication = true;" - readMode: commands - hooks: - - class: ValidateCollections - - class: CheckReplOplogs - - class: CheckReplDBHash - - class: CleanEveryN - n: 20 - fixture: - class: ReplicaSetFixture - mongod_options: - oplogSize: 511 - set_parameters: - enableTestCommands: 1 - numInitialSyncAttempts: 1 - num_nodes: 2 diff --git a/etc/evergreen.yml b/etc/evergreen.yml index ac2ff9930b5..4234dfc13cd 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -1711,6 +1711,7 @@ tasks: vars: resmoke_args: --suites=gle_auth --shellWriteMode=legacy --shellReadMode=legacy --storageEngine=mmapv1 --excludeWithAnyTags=requires_find_command run_multiple_jobs: true + task_excluded_tags: requires_find_command - <<: *task_template name: gle_auth_WT @@ -1720,6 +1721,7 @@ tasks: vars: resmoke_args: --suites=gle_auth --shellWriteMode=legacy --shellReadMode=legacy --storageEngine=wiredTiger --excludeWithAnyTags=requires_find_command run_multiple_jobs: true + task_excluded_tags: requires_find_command - <<: *task_template name: gle_auth_write_cmd @@ -1747,6 +1749,7 @@ tasks: vars: resmoke_args: --suites=gle_auth_basics_passthrough --shellWriteMode=legacy --shellReadMode=legacy --storageEngine=mmapv1 --excludeWithAnyTags=requires_find_command run_multiple_jobs: true + task_excluded_tags: requires_find_command - <<: *task_template name: gle_auth_basics_passthrough_WT @@ -1756,6 +1759,7 @@ tasks: vars: resmoke_args: --suites=gle_auth_basics_passthrough --shellWriteMode=legacy --shellReadMode=legacy --storageEngine=wiredTiger --excludeWithAnyTags=requires_find_command run_multiple_jobs: true + task_excluded_tags: requires_find_command - <<: *task_template name: gle_auth_basics_passthrough_write_cmd @@ -1820,6 +1824,7 @@ tasks: vars: resmoke_args: --suites=sharding_gle_auth_basics_passthrough --shellWriteMode=legacy --shellReadMode=legacy --storageEngine=mmapv1 --excludeWithAnyTags=requires_find_command run_multiple_jobs: true + task_excluded_tags: requires_find_command - <<: *task_template name: sharding_gle_auth_basics_passthrough_WT @@ -1831,6 +1836,7 @@ tasks: vars: resmoke_args: --suites=sharding_gle_auth_basics_passthrough --shellWriteMode=legacy --shellReadMode=legacy --storageEngine=wiredTiger --excludeWithAnyTags=requires_find_command run_multiple_jobs: true + task_excluded_tags: requires_find_command - <<: *task_template name: sharding_gle_auth_basics_passthrough_write_cmd @@ -2341,7 +2347,8 @@ tasks: - func: "do setup" - func: "run tests" vars: - resmoke_args: --suites=parallel --shellReadMode=legacy --shellWriteMode=compatibility --storageEngine=mmapv1 --excludeWithAnyTags=requires_find_command + resmoke_args: --suites=parallel --shellReadMode=legacy --shellWriteMode=compatibility --storageEngine=mmapv1 + task_excluded_tags: requires_find_command - <<: *task_template name: parallel_compatibility_WT @@ -2351,7 +2358,8 @@ tasks: - func: "do setup" - func: "run tests" vars: - resmoke_args: --suites=parallel --shellReadMode=legacy --shellWriteMode=compatibility --storageEngine=wiredTiger --excludeWithAnyTags=requires_find_command + resmoke_args: --suites=parallel --shellReadMode=legacy --shellWriteMode=compatibility --storageEngine=wiredTiger + task_excluded_tags: requires_find_command - <<: *task_template name: concurrency @@ -2601,6 +2609,7 @@ tasks: vars: resmoke_args: --suites=sharding --shellReadMode=legacy --storageEngine=wiredTiger --excludeWithAnyTags=requires_find_command run_multiple_jobs: true + task_excluded_tags: requires_find_command - <<: *task_template name: sharding_auth @@ -2757,42 +2766,6 @@ tasks: resmoke_args: --suites=read_only_sharded --storageEngine=wiredTiger run_multiple_jobs: true -- <<: *task_template - name: views - commands: - - func: "do setup" - - func: "run tests" - vars: - resmoke_args: --suites=views --storageEngine=mmapv1 - run_multiple_jobs: true - -- <<: *task_template - name: views_WT - commands: - - func: "do setup" - - func: "run tests" - vars: - resmoke_args: --suites=views --storageEngine=wiredTiger - run_multiple_jobs: true - -- <<: *task_template - name: views_rs - commands: - - func: "do setup" - - func: "run tests" - vars: - resmoke_args: --suites=views_rs --storageEngine=mmapv1 - run_multiple_jobs: true - -- <<: *task_template - name: views_rs_WT - commands: - - func: "do setup" - - func: "run tests" - vars: - resmoke_args: --suites=views_rs --storageEngine=wiredTiger - run_multiple_jobs: true - - name: package depends_on: - name: compile @@ -3424,10 +3397,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: push - name: linux-64-repeated-execution @@ -3564,10 +3533,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: linux-64-duroff display_name: Linux (No Journal) @@ -3636,10 +3601,6 @@ buildvariants: - name: sharding_jscore_passthrough - name: tool - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: linux-64-lsm stepback: false @@ -3695,8 +3656,6 @@ buildvariants: - name: sharding_jscore_passthrough_wire_ops_WT - name: tool_WT - name: unittests - - name: views_WT - - name: views_rs_WT - name: ubuntu1204 display_name: SSL Ubuntu 12.04 @@ -3811,10 +3770,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: package distros: - ubuntu1604-packer @@ -3942,10 +3897,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: package distros: - ubuntu1604-packer @@ -4064,10 +4015,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: package distros: - ubuntu1604-packer @@ -4506,10 +4453,6 @@ buildvariants: - name: ssl - name: sslSpecial - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: package distros: - ubuntu1604-packer @@ -4631,10 +4574,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: package distros: - ubuntu1604-packer @@ -4994,10 +4933,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: enterprise-windows-64 display_name: "* Enterprise Windows" @@ -5059,10 +4994,6 @@ buildvariants: - name: ssl - name: sslSpecial - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: push distros: - rhel70-small @@ -5345,10 +5276,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: push distros: - rhel70-small @@ -5489,10 +5416,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: enterprise-osx-107 display_name: Enterprise OS X 10.7 @@ -5538,10 +5461,6 @@ buildvariants: - name: ssl - name: sslSpecial - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: push distros: - rhel70-small @@ -5764,10 +5683,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: package distros: - ubuntu1604-packer @@ -5984,10 +5899,6 @@ buildvariants: - name: ssl - name: sslSpecial - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: enterprise-rhel-70-64-bit display_name: Enterprise RHEL 7.0 @@ -6162,10 +6073,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: package distros: - ubuntu1604-packer @@ -6301,10 +6208,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: package distros: - ubuntu1604-packer @@ -6442,8 +6345,6 @@ buildvariants: # - name: tool - name: tool_WT - name: unittests - - name: views_WT - - name: views_rs_WT - name: push distros: - rhel70-small @@ -6579,8 +6480,6 @@ buildvariants: # - name: tool - name: tool_WT - name: unittests - - name: views_WT - - name: views_rs_WT - name: push distros: - rhel70-small @@ -6716,8 +6615,6 @@ buildvariants: # - name: tool - name: tool_WT - name: unittests - - name: views_WT - - name: views_rs_WT - name: push distros: - rhel62-small @@ -7194,10 +7091,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: package distros: - ubuntu1604-packer @@ -7461,10 +7354,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: package distros: - ubuntu1604-packer @@ -7555,10 +7444,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: push distros: - rhel70-small @@ -7798,10 +7683,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: package distros: - ubuntu1604-packer @@ -7923,10 +7804,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: package distros: - ubuntu1604-packer @@ -8023,8 +7900,6 @@ buildvariants: - name: sslSpecial - name: tool - name: unittests - - name: views_WT - - name: views_rs_WT - name: linux-64-ephemeralForTest display_name: Linux (ephemeralForTest) @@ -8101,8 +7976,6 @@ buildvariants: - name: sharding_jscore_passthrough_wire_ops_WT - name: tool - name: unittests - - name: views_WT - - name: views_rs_WT - name: enterprise-rhel-71-ppc64le-inmem display_name: Enterprise RHEL 7.1 PPC64LE (inMemory) DEBUG @@ -8182,7 +8055,6 @@ buildvariants: - name: sslSpecial - name: tool - name: unittests - - name: views - name: enterprise-rhel-72-s390x-inmem display_name: Enterprise RHEL 7.2 s390x (inMemory) DEBUG @@ -8269,7 +8141,6 @@ buildvariants: - name: sslSpecial - name: tool - name: unittests - - name: views - name: ubuntu1404-rocksdb display_name: Ubuntu 14.04 (RocksDB) @@ -8339,7 +8210,6 @@ buildvariants: - name: serial_run - name: sharding_jscore_passthrough - name: unittests - - name: views ########################################### # Experimental buildvariants # @@ -8487,9 +8357,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs_WT - name: ubuntu1604-asan display_name: ~ ASAN SSL Ubuntu 16.04 @@ -8663,9 +8530,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs_WT - name: enterprise-ubuntu-dynamic-1604-64-bit display_name: "* Shared Library Enterprise Ubuntu 16.04" @@ -8815,10 +8679,6 @@ buildvariants: - name: tool - name: tool_WT - name: unittests - - name: views - - name: views_WT - - name: views_rs - - name: views_rs_WT - name: ubuntu1404-jepsen display_name: ~ Jepsen Ubuntu 14.04 diff --git a/jstests/views/durable_view_catalog.js b/jstests/noPassthrough/durable_view_catalog.js index 5c06cf31167..5c06cf31167 100644 --- a/jstests/views/durable_view_catalog.js +++ b/jstests/noPassthrough/durable_view_catalog.js diff --git a/jstests/views/views_feature_compatibility_version.js b/jstests/noPassthrough/views_feature_compatibility_version.js index ea0c609d253..ea0c609d253 100644 --- a/jstests/views/views_feature_compatibility_version.js +++ b/jstests/noPassthrough/views_feature_compatibility_version.js diff --git a/jstests/views/views_legacy.js b/jstests/noPassthrough/views_legacy.js index af2e7d2a380..b1c6252ba50 100644 --- a/jstests/views/views_legacy.js +++ b/jstests/noPassthrough/views_legacy.js @@ -1,9 +1,6 @@ /** * Tests that views properly reject queries in legacy read mode, and reject writes performed in * legacy write mode. Also confirms that legacy killCursors execution is successful. - * - * TODO(SERVER-25641): If the views test suite is moved under core, we can get rid of this test - * after ensuring that it is included in a legacy passthrough suite. */ (function() { "use strict"; @@ -66,4 +63,6 @@ viewsDB.view.find({x: 1}).toArray(); }); assert.eq(res.code, ErrorCodes.CommandNotSupportedOnView, tojson(res)); + + MongoRunner.stopMongod(conn); }()); diff --git a/jstests/views/views_invalid.js b/jstests/noPassthroughWithMongod/views_invalid.js index 5ee963b295e..1749a9900d7 100644 --- a/jstests/views/views_invalid.js +++ b/jstests/noPassthroughWithMongod/views_invalid.js @@ -1,5 +1,7 @@ (function() { - let dbname = 'views_invalid'; + "use strict"; + + const dbname = 'views_invalid'; let invalidDB = db.getSiblingDB(dbname); // Wait for the invalid view definition to be replicated to any secondaries and then drop the diff --git a/jstests/views/initial_sync_views.js b/jstests/replsets/initial_sync_views.js index d6557cb5805..bf60951837b 100644 --- a/jstests/views/initial_sync_views.js +++ b/jstests/replsets/initial_sync_views.js @@ -1,6 +1,5 @@ /** * Test initial sync with views present. - * @tags: [requires_persistence] */ (function() { diff --git a/jstests/views/views_sharded.js b/jstests/sharding/views.js index 42ca90c4ba3..75a8eeda258 100644 --- a/jstests/views/views_sharded.js +++ b/jstests/sharding/views.js @@ -1,10 +1,7 @@ -// Confirms proper behavior when reading from a view that is based on a sharded collection. -// TODO SERVER-24762: Add tests that confirm appropriate error when performing view query: -// a) directly against non-primary shard -// b) directly against primary shard primary -// c) directly against primary shard secondary -// TODO SERVER-24762: Add explain shell helper tests. - +/** + * Tests for expected behavior when querying a view that is based on a sharded collection. + * @tags: [requires_find_command] + */ (function() { "use strict"; @@ -85,4 +82,5 @@ assert.commandFailedWithCode(db.adminCommand({getShardVersion: view.getFullName()}), ErrorCodes.NamespaceNotSharded); + st.stop(); })(); |