Commit Graph

47 Commits

Author SHA1 Message Date
Bernie Hackett
d32016274b PYTHON-736 - Don't close sockets on OperationFailure
This also speeds up returning exhaust sockets to the pool
when the server returns an error and fixes the tests to
run against all MongoDB versions we test against.
2014-07-24 13:22:23 -07:00
A. Jesse Jiryu Davis
9ad421a58a PYTHON-736 Fix exhaust cursor error-handling.
Connection-pool semaphore leak on server error when
creating or iterating an exhaust cursor.
2014-07-23 16:35:01 -07:00
Bernie Hackett
952953d3a1 Fix tests under pypy3. 2014-06-21 22:44:33 -07:00
Bernie Hackett
9d47f1cd3d PYTHON-691 - Fix UserWarning command issues.
Don't raise UserWarning for helpers and internal calls to
commands that do not obey read preference.
2014-05-01 09:21:52 -07:00
Bernie Hackett
8054e95010 Fix auth test util. 2014-04-02 17:37:07 -07:00
A. Jesse Jiryu Davis
595a47f8c1 Fix --nojournal tests for MongoDB 2.6. 2014-04-02 19:08:40 -04:00
A. Jesse Jiryu Davis
1277fc9a36 Factor out oid_generated_on_client test utility. 2014-03-09 23:45:07 -04:00
Bernie Hackett
503558ee2d Dial back trials in one more test. 2014-02-12 18:48:23 -08:00
A. Jesse Jiryu Davis
de9062cf50 Reduce numbers of threads and trials in tests. 2014-02-12 15:59:13 -05:00
Bernie Hackett
76dac543a5 Fix auth check util for MongoDB 2.6 2014-01-31 13:34:55 -08:00
A. Jesse Jiryu Davis
2fa1750b07 Update copyright notices and company name. 2014-01-31 09:36:46 -05:00
Bernie Hackett
01f6361929 Fluent API for bulk write operations PYTHON-630 2014-01-21 11:47:09 -08:00
A. Jesse Jiryu Davis
8f6a34326e Improve multithreaded connection and reconnection in MongoClient, PYTHON-487. 2013-12-04 21:09:15 -05:00
Bernie Hackett
8c8939c6d1 Fix tests under python 3.1 2013-11-21 17:11:46 -08:00
A. Jesse Jiryu Davis
7259e37225 Longer Thread.join() timeout in tests, for very slow machines. 2013-11-20 14:34:36 -05:00
Bernie Hackett
0cb632784a Skip auth tests if auth not enabled PYTHON-556
This change does a few things:

1. In anticipation of the server defaulting to a "disabled" mode for
auth, only run authentication related tests if auth is enabled.
2. Attempt to clean up users in a finally block, even if tests failed.
3. Look for auth settings in "parsed" from getCmdLineOpts in case the
cluster was started with config files.
4. Remove useless remove_all_users calls at the beginning of tests - if
users were added in a previous test and we forgot to clean them up
these are going to fail no matter what when auth is enabled.
2013-11-05 09:10:00 -08:00
Bernie Hackett
0aeee7c514 Really fix test failure in Jython. 2013-11-04 15:45:47 -08:00
A. Jesse Jiryu Davis
97c575866b Fix test failure in Jython. 2013-11-04 17:54:59 -05:00
A. Jesse Jiryu Davis
263ac8f8b7 Prevent concurrent calls to Thread.start() and refactor RS client, PYTHON-560. 2013-11-04 15:37:21 -05:00
Bernie Hackett
bfe4c565a3 Fix remove_all_users for latest 2.5.x nightly 2013-11-02 18:37:04 -07:00
A. Jesse Jiryu Davis
bac66ada33 More reliable test for lazily-connecting clients, PYTHON-560. 2013-10-30 23:26:15 -04:00
A. Jesse Jiryu Davis
be4860a2e5 Don't rely on functools in tests; not available in Python 2.4. 2013-10-30 20:33:02 -04:00
A. Jesse Jiryu Davis
0b9143f5ad Avoid errors on concurrent inserts with lazily-connecting client, PYTHON-560. 2013-10-29 15:18:51 -04:00
A. Jesse Jiryu Davis
16a447e853 Test concurrent access to lazily-connecting client. PYTHON-560 2013-10-29 15:18:51 -04:00
A. Jesse Jiryu Davis
c1f6fece26 Test refactoring: get_pool() and pools_from_rs_client(). 2013-10-08 10:40:16 -04:00
behackett
7d8f4cbb7d Update user manipulation code and tests PYTHON-552
Due to server changes:

removeUser -> dropUser
removeUsersFromDatabase -> dropUsersFromDatabase
source -> db
2013-10-07 15:19:02 -07:00
hawka
a02e37ba5e PYTHON-552: Manipulate user objects exclusively via commands for 2.6 2013-09-24 17:30:33 -07:00
A. Jesse Jiryu Davis
50e04921fd Test text-search on secondaries. PYTHON-530 2013-06-29 19:23:06 -04:00
A. Jesse Jiryu Davis
8536acb4a0 Standardize tests' handling of DB_IP and DB_PORT, fix PYTHON-475 2013-02-19 15:09:28 -05:00
A. Jesse Jiryu Davis
d35bec12e5 Tests use MongoClient instead of Connection PYTHON-451 2013-02-11 20:57:17 -05:00
A. Jesse Jiryu Davis
359dbb0ae1 Better docstring for assertReadFrom test utility function 2013-01-13 23:14:03 -05:00
A. Jesse Jiryu Davis
8395a370bd Fix docstrings 2013-01-03 16:58:48 -05:00
A. Jesse Jiryu Davis
d36f10c095 Move the function one() from test_pooling_base to test_utils 2013-01-03 15:51:30 -05:00
A. Jesse Jiryu Davis
024ed62313 Factor out thread-rendezvous logic from test_threads.py, and use it in test_thread_util.py 2012-12-31 13:06:17 -05:00
A. Jesse Jiryu Davis
e31a07a84c Refactor thread-/greenlet-local stuff from pool.py into thread_util.py PYTHON-428
Preparation for PYTHON-428
2012-12-31 13:05:21 -05:00
A. Jesse Jiryu Davis
a38526e6c3 assertReadFromAll() should ensure that *only* the proper members are read from 2012-12-28 22:36:23 -05:00
A. Jesse Jiryu Davis
25b1ca89a7 Faster assertReadFromAll 2012-12-28 12:35:44 -05:00
A. Jesse Jiryu Davis
ce6d16f9f2 Improve assertReadFromAll docstring 2012-12-28 12:35:35 -05:00
A. Jesse Jiryu Davis
0226ee8798 Support nested calls to Connection.start/end_request PYTHON-420 2012-11-04 21:53:56 -05:00
A. Jesse Jiryu Davis
d976b4021c Raise ConnectionFailure instead of AutoReconnect if the initial server connection fails PYTHON-396 2012-10-23 07:43:26 -04:00
A. Jesse Jiryu Davis
f275b2291a Implement read preferences for distributing reads among replica set members PYTHON-367
Replace the 'mongo' dict with a Member object everywhere in ReplicaSetConnection.
A handful of commands obey read preferences; most are always sent to primary.
Track a 5-sample moving average of each replica set member's ping time.
Connection detects whether it's connected to primary, secondary, or mongos.
2012-07-25 00:05:06 -04:00
behackett
59439e02b8 Fix testing against mongos. PYTHON-373. 2012-07-13 10:38:04 -07:00
A. Jesse Jiryu Davis
f2cd5c6f2b Slightly refactor threading tests 2012-04-29 21:34:05 -04:00
A. Jesse Jiryu Davis
c9c9eeec21 Refactor pooling tests - nearly all tests are now applied both to thread-based and Gevent-based pools PYTHON-296 2012-04-16 14:10:27 -04:00
A. Jesse Jiryu Davis
43faa30f8d Make socket-reclamation tests more reliable in PyPy and Jython PYTHON-287
Conflicts:

	test/utils.py
2012-03-20 13:23:21 -04:00
A. Jesse Jiryu Davis
62e0c23d67 Don't drop databases unnecessarily during tests, saves about 35% of unittest time PYTHON-320 2012-03-19 12:16:33 -04:00
A. Jesse Jiryu Davis
fa296b1711 Style fixes and import cleanups 2012-02-08 18:21:26 -08:00