Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reduce numbers of threads and trials in tests.

  • Loading branch information...
commit de9062cf50b10d3d498e56661e261f1ec6111112 1 parent e3c809b
@ajdavis ajdavis authored
View
35 test/slow/test_high_concurrency.py
@@ -1,35 +0,0 @@
-# Copyright 2013-2014 MongoDB, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Test built in connection-pooling with lots of threads."""
-
-import unittest
-import sys
-
-sys.path[0:0] = [""]
-
-from test.test_pooling_base import _TestMaxPoolSize
-
-
-class TestPoolWithLotsOfThreads(_TestMaxPoolSize, unittest.TestCase):
- use_greenlets = False
-
- def test_max_pool_size_with_leaked_request_super_massive(self):
- # Like test_max_pool_size_with_leaked_request_massive but even more
- # threads. Tests that socket reclamation works under high load,
- # especially in Python <= 2.7.0. You may need to raise ulimit.
- # See http://bugs.python.org/issue1868.
- nthreads = 1000
- self._test_max_pool_size(
- 2, 1, max_pool_size=2 * nthreads, nthreads=nthreads)
View
5 test/test_pooling.py
@@ -164,11 +164,6 @@ def loop(pipe):
class TestMaxPoolSizeThreads(_TestMaxPoolSize, unittest.TestCase):
use_greenlets = False
- def test_max_pool_size_with_leaked_request_massive(self):
- nthreads = 50
- self._test_max_pool_size(
- 2, 1, max_pool_size=2 * nthreads, nthreads=nthreads)
-
class TestPoolSocketSharingThreads(_TestPoolSocketSharing, unittest.TestCase):
use_greenlets = False
View
4 test/test_pooling_base.py
@@ -36,7 +36,7 @@
from test.test_client import get_client
from test.utils import delay, is_mongos, one, get_pool
-N = 50
+N = 10
DB = "pymongo-pooling-tests"
@@ -899,7 +899,7 @@ def _test_max_pool_size_no_rendezvous(self, start_request, end_request):
# On the other hand, nthreads had better be much larger than
# max_pool_size to ensure that max_pool_size sockets are actually
# required at some point in this test's execution.
- nthreads = 30
+ nthreads = 10
if (sys.platform.startswith('java')
and start_request > end_request
View
2  test/test_threads.py
@@ -259,7 +259,7 @@ def test_server_disconnect(self):
assert isinstance(socket_info, SocketInfo)
request_sock = socket_info.sock
- state = FindPauseFind.create_shared_state(nthreads=40)
+ state = FindPauseFind.create_shared_state(nthreads=10)
threads = [
FindPauseFind(collection, state)
View
2  test/utils.py
@@ -463,7 +463,7 @@ class _TestLazyConnectMixin(object):
"""
use_greenlets = False
- NTRIALS = 10
+ NTRIALS = 5
NTHREADS = 10
def test_insert(self):
Please sign in to comment.
Something went wrong with that request. Please try again.