Projet

Général

Profil

0001-skip-test-if-number-of-concurrent-connections-above-.patch

Paul Marillonnet, 12 juillet 2018 16:01

Télécharger (1,12 ko)

Voir les différences:

Subject: [PATCH] skip test if number of concurrent connections above default
 pg limit (#25252)

 tests/test_default_adapter.py | 7 +++++++
 1 file changed, 7 insertions(+)
tests/test_default_adapter.py
59 59
    adapter = DefaultAdapter()
60 60
    p = ThreadPool(concurrency)
61 61

  
62
    if connection.vendor == 'postgresql':
63
        config_cur = connection.cursor()
64
        config_cur.execute('SHOW max_connections')
65
        max_connections = config_cur.fetchone()[0]
66
        if int(max_connections) <= concurrency:
67
            pytest.skip('Number of concurrent connections above postgresql maximum limit')
68

  
62 69
    def f(i):
63 70
        # sqlite has a default lock timeout of 5s seconds between different access to the same in
64 71
        # memory DB
65
-