Skip to content

Commit

Permalink
Merge pull request #171 from twisted/larger-default-watchdog-timeouts
Browse files Browse the repository at this point in the history
default watchdog timeouts increased
  • Loading branch information
glyph committed Aug 11, 2016
2 parents 6b5c42d + 156f07d commit 66a9494
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/test_replicaset.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ def do_query():

@defer.inlineCallbacks
def test_StaleConnection(self):
conn = MongoConnection("localhost", self.ports[0])
conn = MongoConnection("localhost", self.ports[0],
watchdog_interval=10, watchdog_timeout=5)
try:
yield conn.db.coll.count()
self.__mongod[0].kill(signal.SIGSTOP)
Expand Down
2 changes: 1 addition & 1 deletion txmongo/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class ConnectionPool(object):
__wc_possible_options = {'w', "wtimeout", 'j', "fsync"}

def __init__(self, uri="mongodb://127.0.0.1:27017", pool_size=1, ssl_context_factory=None,
watchdog_interval=15, watchdog_timeout=5, **kwargs):
watchdog_interval=30, watchdog_timeout=120, **kwargs):
assert isinstance(uri, StringType)
assert isinstance(pool_size, int)
assert pool_size >= 1
Expand Down

0 comments on commit 66a9494

Please sign in to comment.