Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Increase hard-wired timeout values in ecpg regression tests.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 4 Aug 2020 19:20:31 +0000 (15:20 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 4 Aug 2020 19:20:31 +0000 (15:20 -0400)
A couple of test cases had connect_timeout=14, a value that seems
to have been plucked from a hat.  While it's more than sufficient
for normal cases, slow/overloaded buildfarm machines can get a timeout
failure here, as per recent report from "sungazer".  Increase to 180
seconds, which is in line with our typical timeouts elsewhere in
the regression tests.

Back-patch to 9.6; the code looks different in 9.5, and this doesn't
seem to be quite worth the effort to adapt to that.

Report: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=sungazer&dt=2020-08-04%2007%3A12%3A22

src/interfaces/ecpg/test/connect/test1.pgc
src/interfaces/ecpg/test/connect/test5.pgc
src/interfaces/ecpg/test/expected/connect-test1-minGW32.stderr
src/interfaces/ecpg/test/expected/connect-test1.c
src/interfaces/ecpg/test/expected/connect-test1.stderr
src/interfaces/ecpg/test/expected/connect-test5.c
src/interfaces/ecpg/test/expected/connect-test5.stderr

index 1ffb8c2fbeaa5fe598859d9d40fc782b474ec42d..e03d10f3c1e1b367610feef4a099e87ea118dcde 100644 (file)
@@ -46,7 +46,7 @@ exec sql end declare section;
    exec sql connect to unix:postgresql://localhost/ecpg2_regression user regress_ecpg_user1 using "connectpw";
    exec sql disconnect;
 
-   exec sql connect to unix:postgresql://localhost/ecpg2_regression?connect_timeout=14 user regress_ecpg_user1;
+   exec sql connect to unix:postgresql://localhost/ecpg2_regression?connect_timeout=180 user regress_ecpg_user1;
    exec sql disconnect;
 
    /* wrong db */
index d64ca50c93eb41ef7c2791ee192312c484d010fd..1467bafe5c5a2992537deb51065cf47a73ba99a0 100644 (file)
@@ -55,7 +55,7 @@ exec sql end declare section;
    exec sql connect to 'unix:postgresql://localhost/ecpg2_regression' as main user :user USING "connectpw";
    exec sql disconnect main;
 
-   exec sql connect to unix:postgresql://localhost/ecpg2_regression?connect_timeout=14&client_encoding=latin1 as main user regress_ecpg_user1/connectpw;
+   exec sql connect to unix:postgresql://localhost/ecpg2_regression?connect_timeout=180&client_encoding=latin1 as main user regress_ecpg_user1/connectpw;
    exec sql disconnect main;
 
    exec sql connect to "unix:postgresql://200.46.204.71/ecpg2_regression" as main user regress_ecpg_user1/connectpw;
index 50a6785a02fca9400a0d5ae06a6fa906a2577305..91bd73c305e0627073501097a88d0708a782558c 100644 (file)
@@ -48,7 +48,7 @@
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_finish: connection ecpg2_regression closed
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> with options connect_timeout=14 for user regress_ecpg_user1
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> with options connect_timeout=180 for user regress_ecpg_user1
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_finish: connection ecpg2_regression closed
 [NO_PID]: sqlca: code: 0, state: 00000
index fd9be20f585a9df94914aea43837a3185d0693b0..7d5500ce9c3dc3a757f28b020e81902ba76efef2 100644 (file)
@@ -93,7 +93,7 @@ main(void)
 #line 47 "test1.pgc"
 
 
-   { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/ecpg2_regression?connect_timeout=14" , "regress_ecpg_user1" , NULL , NULL, 0); }
+   { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/ecpg2_regression?connect_timeout=180" , "regress_ecpg_user1" , NULL , NULL, 0); }
 #line 49 "test1.pgc"
 
    { ECPGdisconnect(__LINE__, "CURRENT");}
index ad806a02251f73af222ba33ca0189ec124736f90..b1915be741b1fe0df15c712b03482b7a55d7dd69 100644 (file)
@@ -48,7 +48,7 @@
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_finish: connection ecpg2_regression closed
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> with options connect_timeout=14 for user regress_ecpg_user1
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> with options connect_timeout=180 for user regress_ecpg_user1
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_finish: connection ecpg2_regression closed
 [NO_PID]: sqlca: code: 0, state: 00000
index e991ee79b632978c42573352805a964332567134..b946c0d25a00d44e5d23c6d0e12041df9159d7c5 100644 (file)
@@ -121,7 +121,7 @@ main(void)
 #line 56 "test5.pgc"
 
 
-   { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/ecpg2_regression?connect_timeout=14 & client_encoding=latin1" , "regress_ecpg_user1" , "connectpw" , "main", 0); }
+   { ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/ecpg2_regression?connect_timeout=180 & client_encoding=latin1" , "regress_ecpg_user1" , "connectpw" , "main", 0); }
 #line 58 "test5.pgc"
 
    { ECPGdisconnect(__LINE__, "main");}
index a797fd95d9627049261719faa1eefa84c844eec6..23209163e76de139b0f196c2810eca896216cc0b 100644 (file)
@@ -61,7 +61,7 @@
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_finish: connection main closed
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> with options connect_timeout=14 & client_encoding=latin1 for user regress_ecpg_user1
+[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> with options connect_timeout=180 & client_encoding=latin1 for user regress_ecpg_user1
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_finish: connection main closed
 [NO_PID]: sqlca: code: 0, state: 00000