]> granicus.if.org Git - pgbouncer/commitdiff
Fix up conntest test programs
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 17 Aug 2018 19:50:04 +0000 (21:50 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 17 Aug 2018 19:50:04 +0000 (21:50 +0200)
Allow asynctest to run without an explicitly specified connection
string.  That way it can pick up the connection parameters from the
environment.  The run-conntest.sh driver script was already calling it
that way.

Fix the location of the pgbouncer binary in run-conntest.sh.

test/asynctest.c
test/run-conntest.sh

index 320da5564187fc558231b9071e987898632bfb97..469f50e96aea29f8ba11eb8f12ff532dd0cec99b 100644 (file)
@@ -445,7 +445,7 @@ int main(int argc, char *argv[])
        int i, c;
        DbConn *db;
        unsigned seed = time(NULL) ^ getpid();
-       char *cstr = NULL;
+       char *cstr = "";
        int numcon = 50;
 #ifdef WIN32
        int wsresult;
@@ -494,10 +494,6 @@ int main(int argc, char *argv[])
                }
        }
 
-       if (!cstr) {
-               printf(usage_str);
-               return 1;
-       }
 #ifdef WIN32
         wsresult = WSAStartup(MAKEWORD(2,0),&wsaData);
         if (wsresult != 0)
index e307b3f66cc79cc0f26fa54fb71f82a6644bf667..474d744d824cb1fc31487ca494e457593044ba3b 100644 (file)
@@ -2,8 +2,8 @@
 
 createdb conntest
 
-./pgbouncer -d ctest6000.ini
-./pgbouncer -d ctest7000.ini
+../pgbouncer -d ctest6000.ini
+../pgbouncer -d ctest7000.ini
 
 ./asynctest