summaryrefslogtreecommitdiff
path: root/src/mongo/unittest
Commit message (Collapse)AuthorAgeFilesLines
* SERVER-42165 Replace uses of stdx::mutex with mongo::MutexBen Caimano2019-11-012-4/+4
|
* Apply formatting per `clang-format-7.0.1`clang-format-7.0.12019-07-263-4/+4
|
* Revert "SERVER-4999 Normalize all hostnames to lowercase"A. Jesse Jiryu Davis2019-06-101-5/+0
| | | | This reverts commit ad9267a722e21268d1005c1428ccad85d5a98946 (SERVER-41614).
* SERVER-41133 Add TE::scheduleRemoteCommandOnAnyJason Carey2019-06-072-7/+8
| | | | | | | | | | Add support for a mode for the task executor where rather than targetting a single host, we target any of a set of hosts. This should behave identically to scheduleRemoteCommand, except that we concurrently get() connections from the connection pool for each host, preferring the first which is available (cherry picked from commit efa1ae064b9206f82136a8d14cbb86d47e8754b1)
* SERVER-41047 errnoWithDescription only check __ANDROID_API__ if it's definedKevin Pulo2019-05-291-0/+12
|
* SERVER-40447: Add FlowControl unittests and jstests.Daniel Gottlieb2019-05-201-2/+3
|
* SERVER-4999 Normalize all hostnames to lowercaseA. Jesse Jiryu Davis2019-05-141-0/+5
| | | | | | | | | | Hostnames passed to replSetInitiate, replSetReconfig, addShard, etc. are all normalized by replacing ASCII uppercase characters with lowercase characters, consistent with how MongoDB drivers treat hostnames. The shell's getHostName() function now returns the hostname lowercased. Fixes undefined behavior in mongo::str::toLower().
* SERVER-41075 Remove `mongo/repl/replication_coordinator.h` from op-context ↵ADAM David Alan Martin2019-05-101-3/+2
| | | | | | visible inclusion. A few forward-decl headers were created also.
* SERVER-40765 TaskExecutor inherits from OutOfLineExecutorA. Jesse Jiryu Davis2019-05-042-6/+6
|
* SERVER-40802 move some expensive and commonly instantiated functions out of lineMathias Stearn2019-05-013-20/+162
|
* SERVER-40634 Emulation of C++20 requires-clauses for C++17Mathias Stearn2019-05-012-0/+38
|
* Revert "SERVER-4999 Normalize all hostnames to lowercase"A. Jesse Jiryu Davis2019-04-241-5/+0
| | | | This reverts commit 5e346eb4b9bb3ec678d4eac36b3f0a18c1c10939.
* SERVER-4999 Normalize all hostnames to lowercaseA. Jesse Jiryu Davis2019-04-241-0/+5
| | | | | | | | Hostnames passed to replSetInitiate, replSetReconfig, addShard, etc. are all normalized by replacing ASCII uppercase characters with lowercase characters, consistent with how MongoDB drivers treat hostnames. Fixes undefined behavior in mongo::str::toLower().
* SERVER-40476 remove mongoutils::strBilly Donahue2019-04-092-4/+3
| | | | | | Rename utils/mongoutils/str.h => utils/str.h Rename namespace mongoutils::str => str Rename mongo::strcasecmp => str::caseInsensitiveCompare.
* SERVER-39728 Deinit SSL Manager on Windows in unittests.Henrik Edin2019-04-041-1/+8
| | | | | | This prevents the background threads being started in the Windows thread pool after we return from main() while we're tearing down the CRT causing access violations even though we returned 0 from main.
* SERVER-40357 expand all calls to MONGO_DISALLOW_COPYINGBilly Donahue2019-03-285-12/+16
| | | | | | | | | | | produced by: hits="$(git grep -n MONGO_DISALLOW_COPYING | cut -d: -f1 )" for f in "$hits"; do sed -i.orig ' s/^\( *\)MONGO_DISALLOW_COPYING(\(.*\));/\1\2(const \2\&) = delete;\n\1\2\& operator=(const \2\&) = delete;/; ' $f done
* SERVER-38760 Serialize update commands to BSONJacob Evans2019-02-281-1/+17
|
* SERVER-39725 Migrate unittest options to IDLSara Golemon2019-02-227-50/+156
|
* SERVER-39560 - remove leading blank line on all C++ filesBilly Donahue2019-02-1321-21/+0
| | | | | | Remove leading comments that are just stating the filename. Move any file-level comments below the copyright banner. Remove leading blank lines.
* SERVER-39146 Refactor BatonJason Carey2019-02-052-24/+23
| | | | | Refactor the baton into regular and networking batons while also cleaning up the basic baton implementation.
* SERVER-38176 Compile with /permissive- on MSVC to make the compiler strictly ↵Henrik Edin2019-02-011-1/+1
| | | | standard conformant.
* SERVER-39000 Fix Unittest Framework initialization.ADAM David Alan Martin2019-01-252-24/+46
| | | | | | | | | | | | | | Some tests in `dbtest` do not use the `mongo::unittest::Test` class as a basis for their implementation and thus need some way to benefit from global DB Environment initialization functions. Specifically the changes in SERVER-32630 required `serverCompatibilityVersion` to be set sensibly. Some tests in `dbtest` were not correctly getting this benefit; instead only incidentally getting a correct setting by accident, as the results of an unintended residue of an earlier operation. This can lead to inconsistentcies in which tests pass, as link order changes -- the tests are registered using static initialization, whose instability of order can cause mysterious failures in `dbtest`.
* SERVER-30711: scope_guard rewrite, to avoid -Werror=noexcept-typeBilly Donahue2019-01-111-1/+1
| | | | | | | | Macro ON_BLOCK_EXIT(...) now takes a single callable, Some renames: Dismias -> dismiss MakeGuard => makeGuard
* SERVER-37880 Merge the barrier functionality to be part of the unittests libraryKaloian Manassiev2019-01-101-11/+2
|
* SERVER-37245 Use the SessionCatalog to track sessions on MongoSKaloian Manassiev2018-11-193-74/+39
|
* SERVER-35682 kill existing SharedPromise typeMathias Stearn2018-11-152-10/+9
| | | | This required plumbing unique_function into many more places.
* SERVER-37909 fix lintBenety Goh2018-11-081-6/+6
|
* SERVER-37909 Fix GCC-8 in some tests.ADAM David Alan Martin2018-11-082-18/+5
| | | | | | | GCC-8 doesn't treat `_Pragma(...)` ignore directives in macros the way that Clang does. Instead of this technique, we'll make the requirement on `ASSERT_THROWS`' parameter an expression, not a statement.
* SERVER-37678 Extend cpplint's CheckForCopyright() to check for SSPL.Max Hirschhorn2018-11-051-1/+26
|
* SERVER-37651 Update header files with new licenseRamon Fernandez2018-10-2223-293/+340
|
* SERVER-37365 Don't use `ignore()` in some tests.ADAM David Alan Martin2018-10-022-3/+31
| | | | | | It shouldn't be necessary to explicitly ignore status returns in functions when testing their throw behavior - the test is sufficient to indicate that `Status` is ignored.
* SERVER-37329 Make ShardRemote interruptable while waiting for a responseSpencer T Brody2018-09-282-3/+4
|
* SERVER-35203 Add verbose option to unittestsJonathan Abrahams2018-08-221-1/+18
|
* SERVER-36258 Construct ServiceContext after mongo initializers complete.Andy Schwerin2018-07-273-0/+5
|
* SERVER-35655 Update FCV constants throughout server code.Blake Oler2018-07-021-1/+1
| | | | | | | | | SERVER-35169 Bump wire protocol version for 4.2. SERVER-35752 Ensure tests that rely on FCV pass after updating FCV constants. SERVER-35163 Unblacklist tests that expect FCV version to differ between "last-stable" and "latest." SERVER-34984 Update major_version_upgrade.js to call setFCV to the latest FCV. SERVER-35656 Ensure a 4.0 mongos crashes upon attempting to connect to an FCV 4.2 cluster. SERVER-35404 Re-enable the sharding_last_stable_mongos_and_mixed_shards suite.
* SERVER-34798 Remove ServiceContext subclasses and use new ServiceContext in ↵Andy Schwerin2018-06-222-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | every unit test. This patch does several loosely related and surprisingly hard to separate things. 1.) Make the ServiceContext class final 2.) Create a mechanism, called ConstructorActions, for running methods on ServiceContexts immediately after they're built and immediately before they're destroyed. 3.) Introduce / improve test fixture base classes for tests, giving them fresh ServiceContext instances for each test case. There is one fixture for tests that need a storage engine and another for those that do not. 4.) Make several remaining global variables SC decorations in support of (3) 5.) Replace many MONGO_INITIALIZERS that access getGlobalServiceContext with the new constructor-actions system, which is needed for (3.) 6.) Fix up tests to use the fixtures from (3) and fix tests that silently used different service contexts in together in a technically illegal fashion that now breaks. 7.) Utilize (2) as necessary to simplify initialization of new ServiceContexts, simplifying the fixtures in (3).
* SERVER-35600 Add support for targeting watchosAndrew Morrow2018-06-141-2/+2
|
* SERVER-35284 Construct unit test fixtures only in the child process in C++ ↵Andy Schwerin2018-05-302-6/+9
| | | | death tests.
* SERVER-34805 Refactor the network libraries and move messages types to ↵Andrew Morrow2018-05-051-30/+44
| | | | rpc/protocol
* SERVER-34794 Construct the global ServiceContext inside a MONGO_INITIALIZERAndy Schwerin2018-05-024-27/+4
|
* SERVER-34739 Migrate to 1 connpool in ARSJason Carey2018-04-272-3/+7
| | | | | | | | Migrate to 1 connection pool in mongos. This change involves the introduction of a transport layer baton, which improves perf for a particular transport layer when doing local scatter/gather operations.
* SERVER-34364 replace references to invariantOK with invariantBenety Goh2018-04-261-2/+2
|
* SERVER-33621 fix lintRobert Guo2018-03-291-0/+1
|
* SERVER-33621 Warn if benchmark is not compiled with --opt=onRobert Guo2018-03-291-0/+8
|
* SERVER-30170 Embedded can now shutdown and re-initialize.Henrik Edin2018-03-264-3/+28
| | | | | | | | | - ServiceContext* is now closer to be an instance context for the database. We still don't support multiple instances but I wrote the new code with this in mind. Teardown and reinitialize then becomes a matter of being able to delete and re-create the ServiceContext*. - Use the new MONGO_INITIALIZER that supports deinit/reinit to be able to re-initialize global systems that are decorations on ServiceContext. - Move creation/destruction of ServiceContext* out of MONGO_INITIALIZER. This so we can hold an exclusive lock during as much as possible of the shutdown (like how mongod does) - New ServiceContext registrer where we can link in different implementations of ServiceContext (replaces the SetGlobalEnvironment MONGO_INITIALIZER) - As a result the SetGlobalEnvironment prerequisite for MONGO_INITIALIZERs is gone. - The ServiceContext is passed to runGlobalInitializers, put in InitializationContext/DeinitializationContext so the initializers know which context they operate on.
* SERVER-33758 Make mongo::logger classes use more unique_ptrsBen Caimano2018-03-212-6/+6
| | | | | Appenders and LogDomains now use unique ptrs internally and on signature.
* SERVER-33643 refactor processInfo to no longer depend on globalRobert Guo2018-03-151-5/+1
| | | | initialization.
* SERVER-32630 Ensure the fCV parameter is initialized before readingMaria van Keulen2018-03-093-3/+12
|
* SERVER-33643 call initializeSystemInfo directly as a temporary workaroundRobert Guo2018-03-071-0/+1
|
* SERVER-33628 Handle a mongo/unittest TODO c++11Billy Donahue2018-03-052-79/+98
| | | | | | | | | | | | Use unique_ptr instead of shared_ptr. Simplify with range-based for loops and auto where appropriate. Change ASSERT_EQ guts to rely less on macros. Change the reserved _[A-Z] names (use trailing underscore instead). Change a vector<T*> to vector<unique_ptr<T>>. Change shared_ptr<T*> to unique_ptr<T>. Add a comment to mongoutils::str::stream lamenting missing relops. Add static to comparator() members. Add static constexpr to name() members.