Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-85922

Improve sharding suites test exclusions

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Execution

    Description

      Currently the sharding suites exclude unsupported tests via explicit paths on a per-test basis. This could be potentially error prone, as there is currently no centralized mechanism for updating all the relevant suites once the original problem has been addressed. This also means that if a new exclusion is needed, the author would need to manually go through all the failing suites and add the exclusion.

      For example, consider the following extract from sharded_collections_jscore_passthrough:

        # The following tests fail because a certain command or functionality is not supported by
        # mongos. This command or functionality is placed in a comment next to the failing test.
        - jstests/core/**/apitest_db.js  # serverStatus output doesn't have storageEngine.
        - jstests/core/**/awaitdata_getmore_cmd.js  # capped collections.
        - jstests/core/**/bypass_doc_validation.js  # sharded $out output not permitted
        - jstests/core/**/check_shard_index.js  # checkShardingIndex.
        - jstests/core/**/collection_truncate.js  # emptycapped.
        - jstests/core/**/compact_keeps_indexes.js  # compact.
        - jstests/core/**/currentop.js  # uses fsync.
        - jstests/core/**/dbhash.js  # dbhash.
        - jstests/core/**/fsync.js  # uses fsync.
        - jstests/core/**/geo_s2cursorlimitskip.js  # profiling.
        - jstests/core/**/geo_update_btree2.js  # notablescan.
        - jstests/core/**/index9.js  # "local" database.
        - jstests/core/**/queryoptimizera.js  # "local" database.
        - jstests/core/**/stages*.js  # stageDebug.
        - jstests/core/**/startup_log.js  # "local" database.
        - jstests/core/**/tailable_cursor_invalidation.js # capped collections.
        - jstests/core/**/tailable_getmore_batch_size.js # capped collections.
        - jstests/core/**/tailable_skip_limit.js # capped collections.
        - jstests/core/**/top.js  # top. 

      The preferred approach in this specific case would be to mark each of those tests with assumes_against_mongod_not_mongos

      Other common exclusions could be improved by using YAML placeholders such as:

      testNotWorkingInSharding: &createAnAnchorThatWillBeUsedInOtherSuites
      - testA
      - testB
       
      // in some other suite
       
      exclude_files:
      - *createAnAnchorThatWillBeUsedInOtherSuites
      - otherTest 

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            catalin.sumanaru@mongodb.com Catalin Sumanaru
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: