File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,25 @@ def test_worker_will_not_block_drop_database(autocommit_sess):
20
20
assert result is not None
21
21
assert result == 1
22
22
23
+ (pg_version ,) = autocommit_sess .execute (text (
24
+ """
25
+ select current_setting('server_version_num');
26
+ """
27
+ )).fetchone ()
28
+
29
+ # drop database with force only available from pg 13
30
+ if int (pg_version ) >= 130000 :
31
+
32
+ autocommit_sess .execute (text ("create database foo;" ))
33
+ autocommit_sess .execute (text ("drop database foo with (force);" ))
34
+
35
+ (result ,) = autocommit_sess .execute (text ("""
36
+ select 1
37
+ """ )).fetchone ()
38
+
39
+ assert result is not None
40
+ assert result == 1
41
+
23
42
24
43
def test_success_when_worker_is_up (sess ):
25
44
"""net.check_worker_is_up should not return anything when the worker is running"""
You can’t perform that action at this time.
0 commit comments