Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias alias alias Assign SubscriptStore AttributeLoad NameLoad attr Slice Num Num ListLoad Str ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias alias ImportFrom alias alias alias alias alias FunctionDef arguments args defaults body Pass decorator_list AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults Num body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad While NameLoad body Assert CompareLt BinOpSub Call AttributeLoad NameLoad attr NameLoad NameLoad Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Num If UnaryOpNot Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Raise NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num NameLoad Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Dict Str NameLoad attr Assert CompareEq NameLoad SubscriptLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Index Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Dict decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad NameLoad body TryExcept body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Dict Str Str handlers ExceptHandler type NameLoad body Pass orelse Raise Call NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Str With Call AttributeLoad AttributeLoad NameLoad attr attr Dict keyword NameLoad NameStore body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad Assign NameStore Num For NameStore NameLoad body For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr For NameStore NameLoad body Assert AttributeLoad NameLoad attr BinOpMod Str Call NameLoad NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListComp Dict comprehension NameStore Call NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults TupleLoad NameLoad NameLoad vararg kwarg body Return Call NameLoad NameLoad Call NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign AttributeStore NameLoad attr Num With Call AttributeLoad NameLoad attr Dict NameStore body Pass With Call AttributeLoad NameLoad attr Dict NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword Num With Call AttributeLoad NameLoad attr NameLoad body With Call AttributeLoad NameLoad attr Dict NameStore body Expr BinOpDiv Num Num With Call AttributeLoad NameLoad attr Dict NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr Dict NameStore body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword Num Assign AttributeStore NameLoad attr Num With Call AttributeLoad NameLoad attr Dict NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr Dict NameStore body Expr Call AttributeLoad NameLoad attr Num Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr Dict body Pass decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr Dict NameStore body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword Num keyword Num Assign AttributeStore NameLoad attr Num With Call AttributeLoad NameLoad attr Dict NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore NameStore AttributeStore NameLoad attr TupleLoad AttributeLoad NameLoad attr TupleLoad Str Num With Call AttributeLoad NameLoad attr NameLoad body With Call AttributeLoad NameLoad attr Dict body Pass Assign AttributeStore NameLoad attr NameLoad With Call AttributeLoad NameLoad attr Dict keyword NameLoad NameStore body Pass Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword NameLoad With Call AttributeLoad NameLoad attr Dict NameStore body Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body With Call AttributeLoad NameLoad attr Dict body Pass Assign NameStore BinOpSub Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareLt Call NameLoad BinOpSub NameLoad NameLoad Num BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Num With Call AttributeLoad NameLoad attr Dict NameStore body Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr While CompareNotEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str While CompareNotEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword NameLoad With Call AttributeLoad NameLoad attr Dict body With Call AttributeLoad NameLoad attr Dict body Assign NameStore ListLoad For NameStore Call NameLoad Num body Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameLoad body With Call AttributeLoad NameLoad attr Dict body Pass decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore ListLoad For NameStore Call NameLoad Num body With Call AttributeLoad NameLoad attr Dict keyword NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad For NameStore Call NameLoad Num body Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Num Assign NameStore Call NameLoad keyword NameLoad Assign NameStore AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Dict Assign NameStore Call NameLoad NameLoad Assign NameStore Num Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num FunctionDef arguments args defaults body For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr Dict Str Call NameLoad Num Assert CompareLtE Call NameLoad AttributeLoad NameLoad attr NameLoad With NameLoad body AugAssignAdd AttributeStore NameLoad attr Num decorator_list For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareGt Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword NameLoad Assign NameStore AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Dict Assign NameStore Call NameLoad NameLoad Assign NameStore Num Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num FunctionDef arguments args defaults body For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr Dict Str Call NameLoad Num With NameLoad body AugAssignAdd AttributeStore NameLoad attr Num decorator_list For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareGt Call NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad TupleLoad Str Num Call NameLoad keyword Num keyword Num keyword Num keyword Num For NameStore Call NameLoad Num body With Call AttributeLoad NameLoad attr NameLoad NameStore body With Call AttributeLoad NameLoad attr Dict keyword NameLoad body Pass Expr Call AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A Test built in connection-pooling with threads. N/A gc N/A random N/A socket N/A sys N/A threading N/A time pymongo MongoClient pymongo.errors AutoReconnect ConnectionFailure DuplicateKeyError ExceededMaxWaiters N/A N/A N/A sys path N/A 0 0 N/A pymongo.network socket_closed pymongo.pool Pool PoolOptions test host port SkipTest unittest client_context test.utils get_pool joinall delay one rs_or_single_client setUpModule N/A N/A N/A N/A N/A N/A N/A client_context require_connection N/A N 10 N/A DB pymongo-pooling-tests gc_collect_until_done N/A N/A threads timeout N/A 60 N/A N/A start N/A N/A time time N/A running N/A list threads N/A running N/A N/A N/A N/A N/A N/A time time start timeout Threads timed out N/A t running N/A N/A N/A N/A t join 0.1 N/A N/A N/A N/A t isAlive N/A N/A N/A N/A running remove t N/A N/A N/A gc collect N/A MongoThread N/A N/A threading Thread N/A N/A A thread that uses a MongoClient. __init__ N/A N/A self client N/A N/A N/A N/A N/A N/A super MongoThread self __init__ N/A N/A self daemon True N/A N/A self client client N/A N/A self db N/A N/A self client N/A DB N/A N/A self passed False N/A run N/A N/A self N/A N/A N/A N/A N/A self run_mongo_thread N/A N/A self passed True N/A run_mongo_thread N/A N/A self N/A N/A N/A NotImplementedError N/A N/A InsertOneAndFind N/A MongoThread N/A run_mongo_thread N/A N/A self N/A N/A N/A _ N/A range N N/A N/A rand N/A N/A random randint 0 N N/A _id N/A N/A N/A N/A N/A self db sf insert_one N/A x rand inserted_id N/A N/A rand N/A N/A N/A N/A N/A self db sf find_one _id N/A x N/A N/A Unique N/A MongoThread N/A run_mongo_thread N/A N/A self N/A N/A N/A _ N/A range N N/A N/A N/A N/A N/A N/A self db unique insert_one N/A N/A N/A NonUnique N/A MongoThread N/A run_mongo_thread N/A N/A self N/A N/A N/A _ N/A range N N/A N/A N/A N/A N/A N/A N/A N/A self db unique insert_one N/A _id jesse N/A N/A N/A DuplicateKeyError N/A N/A N/A N/A N/A AssertionError Should have raised DuplicateKeyError N/A N/A Disconnect N/A MongoThread N/A run_mongo_thread N/A N/A self N/A N/A N/A _ N/A range N N/A N/A N/A N/A N/A self client close N/A N/A SocketGetter N/A MongoThread N/A N/A Utility for TestPooling.

    Checks out a socket and holds it forever. Used in
    test_no_wait_queue_timeout, test_wait_queue_multiple, and
    test_no_wait_queue_multiple.
     __init__ N/A N/A self client pool N/A N/A N/A N/A N/A N/A super SocketGetter self __init__ client N/A N/A self state init N/A N/A self pool pool N/A N/A self sock None N/A run_mongo_thread N/A N/A self N/A N/A N/A N/A self state get_socket N/A N/A N/A N/A self pool get_socket N/A checkout True sock N/A N/A N/A self sock sock N/A N/A self state sock N/A __del__ N/A N/A self N/A N/A N/A N/A self sock N/A N/A N/A N/A N/A self sock close N/A N/A run_cases N/A N/A client cases N/A N/A N/A threads N/A N/A n_runs 5 N/A case cases N/A N/A i N/A range n_runs N/A N/A t N/A case client N/A N/A N/A t start N/A N/A N/A threads append t N/A t threads N/A N/A N/A N/A t join N/A t threads N/A N/A N/A t passed N/A %s.run() threw an exception N/A repr t N/A _TestPoolingBase N/A N/A unittest TestCase N/A N/A Base class for all connection-pool tests. setUp N/A N/A self N/A N/A N/A N/A self c N/A rs_or_single_client N/A db N/A N/A self c N/A DB N/A N/A N/A N/A db unique drop N/A N/A N/A N/A db test drop N/A N/A N/A N/A db unique insert_one N/A _id jesse N/A N/A N/A N/A db test insert_many N/A N/A N/A _ N/A range 10 N/A create_pool N/A N/A self pair N/A N/A host port args kwargs N/A N/A N/A Pool pair N/A PoolOptions args kwargs N/A N/A TestPooling N/A _TestPoolingBase N/A test_max_pool_size_validation N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError MongoClient host host port port maxPoolSize -1 N/A N/A N/A self assertRaises ValueError MongoClient host host port port maxPoolSize foo N/A c N/A MongoClient host host port port maxPoolSize 100 N/A N/A N/A self assertEqual N/A c max_pool_size 100 N/A test_no_disconnect N/A N/A self N/A N/A N/A N/A run_cases N/A self c N/A NonUnique Unique InsertOneAndFind N/A test_disconnect N/A N/A self N/A N/A N/A N/A run_cases N/A self c N/A InsertOneAndFind Disconnect Unique N/A test_pool_reuses_open_socket N/A N/A self N/A N/A N/A cx_pool N/A N/A self create_pool max_pool_size 10 N/A N/A cx_pool _check_interval_seconds 0 N/A N/A N/A cx_pool get_socket N/A sock_info N/A N/A N/A N/A N/A cx_pool get_socket N/A new_sock_info N/A N/A N/A N/A self assertEqual sock_info new_sock_info N/A N/A N/A self assertEqual 1 N/A len N/A cx_pool sockets N/A test_get_socket_and_exception N/A N/A self N/A N/A N/A cx_pool N/A N/A self create_pool max_pool_size 1 wait_queue_timeout 1 N/A N/A N/A self assertRaises ZeroDivisionError N/A N/A N/A N/A cx_pool get_socket N/A sock_info N/A N/A N/A 1 0 N/A N/A N/A cx_pool get_socket N/A new_sock_info N/A N/A N/A N/A self assertEqual sock_info new_sock_info N/A N/A N/A self assertEqual 1 N/A len N/A cx_pool sockets N/A test_pool_removes_closed_socket N/A N/A self N/A N/A N/A cx_pool N/A N/A self create_pool N/A N/A N/A cx_pool get_socket N/A sock_info N/A N/A N/A N/A sock_info close N/A N/A N/A self assertEqual 0 N/A len N/A cx_pool sockets N/A test_pool_removes_dead_socket N/A N/A self N/A N/A N/A cx_pool N/A N/A self create_pool max_pool_size 1 wait_queue_timeout 1 N/A N/A cx_pool _check_interval_seconds 0 N/A N/A N/A cx_pool get_socket N/A sock_info N/A N/A N/A N/A N/A sock_info sock close N/A N/A N/A self assertTrue N/A socket_closed N/A sock_info sock N/A N/A N/A cx_pool get_socket N/A new_sock_info N/A N/A N/A N/A self assertEqual 0 N/A len N/A cx_pool sockets N/A N/A N/A self assertNotEqual sock_info new_sock_info N/A N/A N/A self assertEqual 1 N/A len N/A cx_pool sockets N/A N/A N/A cx_pool get_socket N/A N/A N/A N/A test_socket_closed N/A N/A self N/A N/A N/A s N/A N/A socket socket N/A socket AF_INET N/A socket SOCK_STREAM N/A N/A N/A s connect N/A host port N/A N/A N/A self assertFalse N/A socket_closed s N/A N/A N/A s close N/A N/A N/A self assertTrue N/A socket_closed s N/A test_return_socket_after_reset N/A N/A self N/A N/A N/A pool N/A N/A self create_pool N/A N/A N/A pool get_socket N/A sock N/A N/A N/A N/A pool reset N/A N/A N/A self assertTrue N/A sock closed N/A N/A N/A self assertEqual 0 N/A len N/A pool sockets N/A test_pool_check N/A N/A self N/A N/A N/A cx_pool N/A N/A self create_pool max_pool_size 1 connect_timeout 1 wait_queue_timeout 1 N/A N/A cx_pool _check_interval_seconds 0 N/A N/A N/A cx_pool get_socket N/A sock_info N/A N/A N/A N/A N/A sock_info sock close N/A N/A address N/A cx_pool address N/A N/A cx_pool address N/A foo.com 1234 N/A N/A N/A self assertRaises AutoReconnect N/A N/A N/A N/A cx_pool get_socket N/A N/A N/A N/A N/A cx_pool address address N/A N/A N/A cx_pool get_socket N/A checkout True sock_info N/A N/A N/A N/A N/A sock_info close N/A test_wait_queue_timeout N/A N/A self N/A N/A N/A wait_queue_timeout 2 N/A pool N/A N/A self create_pool max_pool_size 1 wait_queue_timeout wait_queue_timeout N/A N/A N/A pool get_socket N/A sock_info N/A N/A start N/A N/A time time N/A N/A N/A self assertRaises ConnectionFailure N/A N/A N/A N/A pool get_socket N/A N/A N/A N/A duration N/A N/A N/A time time start N/A N/A N/A self assertTrue N/A N/A abs N/A wait_queue_timeout duration 1 N/A Waited %.2f seconds for a socket, expected %f N/A duration wait_queue_timeout N/A N/A N/A sock_info close N/A test_no_wait_queue_timeout N/A N/A self N/A N/A N/A pool N/A N/A self create_pool max_pool_size 1 N/A N/A N/A pool get_socket N/A s1 N/A N/A t N/A SocketGetter N/A self c pool N/A N/A N/A t start N/A N/A N/A t state get_socket N/A N/A N/A N/A time sleep 0.1 N/A N/A N/A time sleep 1 N/A N/A N/A self assertEqual N/A t state get_socket N/A N/A N/A t state sock N/A N/A N/A N/A time sleep 0.1 N/A N/A N/A self assertEqual N/A t state sock N/A N/A N/A self assertEqual N/A t sock s1 N/A N/A N/A s1 close N/A test_wait_queue_multiple N/A N/A self N/A N/A N/A wait_queue_multiple 3 N/A pool N/A N/A self create_pool max_pool_size 2 wait_queue_multiple wait_queue_multiple N/A N/A N/A pool get_socket N/A N/A N/A N/A N/A pool get_socket N/A N/A N/A threads N/A N/A _ N/A range 6 N/A N/A t N/A SocketGetter N/A self c pool N/A N/A N/A t start N/A N/A N/A threads append t N/A N/A N/A time sleep 1 N/A t threads N/A N/A N/A N/A self assertEqual N/A t state get_socket N/A N/A N/A self assertRaises ExceededMaxWaiters N/A N/A N/A N/A pool get_socket N/A N/A N/A N/A test_no_wait_queue_multiple N/A N/A self N/A N/A N/A pool N/A N/A self create_pool max_pool_size 2 N/A socks N/A N/A _ N/A range 2 N/A N/A N/A N/A pool get_socket N/A checkout True sock N/A N/A N/A N/A socks append sock N/A threads N/A N/A _ N/A range 30 N/A N/A t N/A SocketGetter N/A self c pool N/A N/A N/A t start N/A N/A N/A threads append t N/A N/A N/A time sleep 1 N/A t threads N/A N/A N/A N/A self assertEqual N/A t state get_socket N/A socket_info socks N/A N/A N/A N/A socket_info close N/A N/A TestPoolMaxSize N/A _TestPoolingBase N/A test_max_pool_size N/A N/A self N/A N/A N/A max_pool_size 4 N/A c N/A rs_or_single_client maxPoolSize max_pool_size N/A collection N/A N/A c N/A DB test N/A N/A N/A collection drop N/A N/A N/A collection insert_one N/A N/A cx_pool N/A get_pool c N/A nthreads 10 N/A threads N/A N/A lock N/A N/A threading Lock N/A N/A self n_passed 0 f N/A N/A N/A N/A N/A _ N/A range 5 N/A N/A N/A N/A collection find_one N/A $where N/A delay 0.1 N/A N/A N/A len N/A cx_pool sockets max_pool_size N/A lock N/A N/A N/A self n_passed 1 N/A N/A i N/A range nthreads N/A N/A t N/A N/A threading Thread target f N/A N/A N/A threads append t N/A N/A N/A t start N/A N/A joinall threads N/A N/A N/A self assertEqual nthreads N/A self n_passed N/A N/A N/A self assertTrue N/A N/A len N/A cx_pool sockets 1 N/A N/A N/A self assertEqual max_pool_size N/A N/A cx_pool _socket_semaphore counter N/A test_max_pool_size_none N/A N/A self N/A N/A N/A c N/A rs_or_single_client maxPoolSize None N/A collection N/A N/A c N/A DB test N/A N/A N/A collection drop N/A N/A N/A collection insert_one N/A N/A cx_pool N/A get_pool c N/A nthreads 10 N/A threads N/A N/A lock N/A N/A threading Lock N/A N/A self n_passed 0 f N/A N/A N/A N/A N/A _ N/A range 5 N/A N/A N/A N/A collection find_one N/A $where N/A delay 0.1 N/A lock N/A N/A N/A self n_passed 1 N/A N/A i N/A range nthreads N/A N/A t N/A N/A threading Thread target f N/A N/A N/A threads append t N/A N/A N/A t start N/A N/A joinall threads N/A N/A N/A self assertEqual nthreads N/A self n_passed N/A N/A N/A self assertTrue N/A N/A len N/A cx_pool sockets 1 N/A test_max_pool_size_zero N/A N/A self N/A N/A N/A N/A N/A self assertRaises ValueError N/A N/A N/A rs_or_single_client maxPoolSize 0 N/A test_max_pool_size_with_connection_failure N/A N/A self N/A N/A N/A test_pool N/A Pool N/A example.com 27017 N/A PoolOptions max_pool_size 1 connect_timeout 1 socket_timeout 1 wait_queue_timeout 1 N/A i N/A range 2 N/A N/A N/A N/A self assertRaises AutoReconnect context N/A N/A N/A N/A test_pool get_socket N/A checkout True N/A N/A N/A N/A N/A self assertNotIn waiting for socket from pool N/A str N/A context exception N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main