File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 17
17
_system = platform .uname ().system
18
18
19
19
20
+ if os .environ .get ('TRAVIS_OS_NAME' ) == 'osx' :
21
+ # Travis' macOS is _slow_.
22
+ POOL_NOMINAL_TIMEOUT = 0.5
23
+ else :
24
+ POOL_NOMINAL_TIMEOUT = 0.1
25
+
26
+
20
27
class TestPool (tb .ConnectedTestCase ):
21
28
22
29
async def test_pool_01 (self ):
@@ -63,14 +70,14 @@ async def test_pool_04(self):
63
70
pool = await self .create_pool (database = 'postgres' ,
64
71
min_size = 1 , max_size = 1 )
65
72
66
- con = await pool .acquire (timeout = 0.1 )
73
+ con = await pool .acquire (timeout = POOL_NOMINAL_TIMEOUT )
67
74
con .terminate ()
68
75
await pool .release (con )
69
76
70
- async with pool .acquire (timeout = 0.1 ):
77
+ async with pool .acquire (timeout = POOL_NOMINAL_TIMEOUT ):
71
78
con .terminate ()
72
79
73
- con = await pool .acquire (timeout = 0.1 )
80
+ con = await pool .acquire (timeout = POOL_NOMINAL_TIMEOUT )
74
81
self .assertEqual (await con .fetchval ('SELECT 1' ), 1 )
75
82
76
83
await pool .close ()
You can’t perform that action at this time.
0 commit comments