[SERVER-10868] Make external sort tests into standalone unit tests, outside of dbtests/test.exe. Created: 24/Sep/13  Updated: 11/Jul/16  Resolved: 13/Nov/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5.4

Type: Improvement Priority: Major - P3
Reporter: Andy Schwerin Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Participants:

 Description   
  1. Implement an RAII "temp directory" object that creates a temporary directory on creation, and deletes it and its contents when it goes out of scope (or logs if it fails to delete).
  2. Extend the unittest framework to take an optional --temppath command line argument, falling back to $TMP then $TEMP then working directory, for choosing the root location for temporary directories.
  3. Make the working path of the external sorter a construction parameter, rather than the global "dbpath" variable, but have MongoD always use dbapth + "/_tmp" for the sorter work area.
  4. Pull the sorter test out of test.exe, utilizing 1-3 above.
  5. Update smoke.py to pass an apporpriate --temppath to C++ unittests. Pick a default that makes the sorter test work like it does today, except not in test.exe.
  6. Update MCI builders as desired to supply a different temp path, and perhaps to clean up after it.


 Comments   
Comment by auto [ 13/Nov/13 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-10868 Add --temp-path parameter to smoke.py
Branch: master
https://github.com/mongodb/mongo/commit/1c05609c89ecb6c53787d05d01cdf1b2e4acdada

Comment by auto [ 13/Nov/13 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-10868 add --tempPath parameter to unittests and dbtests
Branch: master
https://github.com/mongodb/mongo/commit/0588759bcbdf8481fe01ea90986f17059c18a7fe

Comment by auto [ 27/Sep/13 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-10868 Move Sorter tests out of dbtests to a unit test
Branch: master
https://github.com/mongodb/mongo/commit/01142042154d9ae47f5435c5a8df47c650dc376c

Comment by auto [ 27/Sep/13 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-10868 Step 3: Pass the temporary directory into Sorter

This removes the direct link-time dependency on dbpath from Sorter and
the aggregation DocumentSources that use it.

After this commit dbpath can once-again be removed from mongos. Not
making that change now however to avoid colliding with Shaun's work.

Prep for SERVER-10868: move external sort tests out of dbtests
Branch: master
https://github.com/mongodb/mongo/commit/7e206a4fa6e9aa6ea283f4da3daec127c41f88b5

Comment by auto [ 27/Sep/13 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-10868 Step 3: Pass the temporary directory into Sorter

This removes the direct link-time dependency on dbpath from Sorter and
the aggregation DocumentSources that use it.

After this commit dbpath can once-again be removed from mongos. Not
making that change now however to avoid colliding with Shaun's work.

Prep for SERVER-10868: move external sort tests out of dbtests
Branch: master
https://github.com/mongodb/mongo/commit/7e206a4fa6e9aa6ea283f4da3daec127c41f88b5

Comment by auto [ 27/Sep/13 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-10868 Step 1: Make an RAII TempDir class for unit tests

Prep for SERVER-10868: move external sort tests out of dbtests
Branch: master
https://github.com/mongodb/mongo/commit/152e2750461f8410010a30f95431e43314f131ab

Comment by auto [ 27/Sep/13 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-10868 Step 1: Make an RAII TempDir class for unit tests

Prep for SERVER-10868: move external sort tests out of dbtests
Branch: master
https://github.com/mongodb/mongo/commit/152e2750461f8410010a30f95431e43314f131ab

Generated at Thu Feb 08 03:24:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.