Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 924c209

Browse files
committed
Extend test read timeout value
1 parent 1237453 commit 924c209

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/unit/replicator_tests.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright (C) 2015, 2018 IBM Corp. All rights reserved.
2+
# Copyright (C) 2015, 2020 IBM Corp. All rights reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -220,10 +220,13 @@ def test_create_replication(self):
220220
def test_timeout_in_create_replication(self):
221221
"""
222222
Test that a read timeout exception is thrown when creating a
223-
replicator with a timeout value of 500 ms.
223+
replicator with a read timeout value of 5 s.
224224
"""
225-
# Setup client with a timeout
226-
self.set_up_client(auto_connect=True, timeout=.5)
225+
# Setup client with a read timeout (but the standard connect timeout)
226+
# Note that this timeout applies to all connections from this client
227+
# setting it too short can cause intermittent failures when responses
228+
# are not quick enough. Setting it too long makes the test take longer.
229+
self.set_up_client(auto_connect=True, timeout=(30,5))
227230
self.db = self.client[self.test_target_dbname]
228231
self.target_db = self.client[self.test_dbname]
229232
# Construct a replicator with the updated client

0 commit comments

Comments
 (0)