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

CleanupEveryN test hook can leave grabage databases

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL

      In SERVER-94991 we made so that CleanupEverN test hook, after every test execution, will drop all the databases created by the test. The hook simply call listDatabases and for each database issue a dropDatabase command.

      This ensures that the subsequent test will see a "clean" state and that they don't need to worry about previously created dbs or collections.

      Due to the bug described in SERVER-54377  listDatabases only returns databases that contain at least 1 collection. So CleanupEveryN hook will simply skip to drop databases with no collections.

      This is problematic for those test that expect no databases to exists. For instance there are tests that try to create a database on a specific shard, these test could potentially fail because the database already exists but on a different shard (e.g. unshard_collection_with_zones.js)

            Assignee:
            Unassigned Unassigned
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: