[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-cvs
Subject:    [PECL-CVS] com =?UTF-8?Q?pecl/database/mysql=5Fxdevapi=3A=20WL=23=31=32=31=38=39=20?= =?UTF-8?Q?=3A=
From:       hery ramilison <mysqlre () php ! net>
Date:       2018-07-19 20:34:31
Message-ID: php-mail-d1aad23280e2e8634196b5ef3ea01def165276555 () git ! php ! net
[Download RAW message or body]

Commit:    d257e4ed7cb65dcd41d01f995778ca97c440f9c3
Author:    Darek Slusarczyk <dariusz.slusarczyk@oracle.com>         Thu, 19 Jul 2018 \
                22:34:31 +0200
Parents:   79fc7e07969450217efe7c59efbab6881d248424
Branches:  release/8.0.13

Link:       http://git.php.net/?p=pecl/database/mysql_xdevapi.git;a=commitdiff;h=d257e4ed7cb65dcd41d01f995778ca97c440f9c3


Log:
WL#12189 : Implement connect timeout
- change non-routable IPs to fix random connecting issues on pb2 :-P

Bugs:
https://bugs.php.net/12189

Changed paths:
  M  tests/auth/timeout/default_timeout.phpt
  M  tests/auth/timeout/disabled_timeout.phpt
  M  tests/auth/timeout/elapsed_timeout.phpt
  M  tests/auth/timeout/timeout_utils.inc


Diff:
diff --git a/tests/auth/timeout/default_timeout.phpt \
b/tests/auth/timeout/default_timeout.phpt index 11990da..7bddaf9 100644
--- a/tests/auth/timeout/default_timeout.phpt
+++ b/tests/auth/timeout/default_timeout.phpt
@@ -8,7 +8,7 @@ error_reporting=1
 require_once(__DIR__."/../../connect.inc");
 require_once(__DIR__."/timeout_utils.inc");
 
-test_elapsed_timeout($Non_routable_host4, 81, null);
+test_elapsed_timeout($Non_routable_host4, 3306, null);
 
 verify_expectations();
 print "done!\n";
@@ -19,7 +19,7 @@ print "done!\n";
 	clean_test_db();
 ?>
 --EXPECTF--
-mysqlx://testuser:testpasswd@203.0.113.255:81
+mysqlx://testuser:testpasswd@192.0.2.2:3306
 ----------------------
 connecting time %f
 ______________________
diff --git a/tests/auth/timeout/disabled_timeout.phpt \
b/tests/auth/timeout/disabled_timeout.phpt index cc2b3fb..a940330 100644
--- a/tests/auth/timeout/disabled_timeout.phpt
+++ b/tests/auth/timeout/disabled_timeout.phpt
@@ -9,8 +9,8 @@ default_socket_timeout=3
 require_once(__DIR__."/../../connect.inc");
 require_once(__DIR__."/timeout_utils.inc");
 
-test_elapsed_timeout($Non_routable_host2, 83, 0);
-test_elapsed_timeout($Non_routable_host3, 82, 0);
+test_elapsed_timeout($Non_routable_host2, 3306, 0);
+test_elapsed_timeout($Non_routable_host3, 33060, 0);
 
 verify_expectations();
 print "done!\n";
@@ -21,11 +21,11 @@ print "done!\n";
 	clean_test_db();
 ?>
 --EXPECTF--
-mysqlx://testuser:testpasswd@203.0.113.4:83/?connect-timeout=0
+mysqlx://testuser:testpasswd@203.0.113.4:3306/?connect-timeout=0
 ----------------------
 connecting time %f
 ______________________
-mysqlx://testuser:testpasswd@198.51.100.255:82/?connect-timeout=0
+mysqlx://testuser:testpasswd@198.51.100.8:33060/?connect-timeout=0
 ----------------------
 connecting time %f
 ______________________
diff --git a/tests/auth/timeout/elapsed_timeout.phpt \
b/tests/auth/timeout/elapsed_timeout.phpt index 0b3cde7..6524d8c 100644
--- a/tests/auth/timeout/elapsed_timeout.phpt
+++ b/tests/auth/timeout/elapsed_timeout.phpt
@@ -8,8 +8,8 @@ error_reporting=1
 require_once(__DIR__."/../../connect.inc");
 require_once(__DIR__."/timeout_utils.inc");
 
-test_elapsed_timeout($Non_routable_host, 83, 3);
-test_elapsed_timeout($Non_routable_host1, 81, 2);
+test_elapsed_timeout($Non_routable_host, 33060, 3);
+test_elapsed_timeout($Non_routable_host1, 3306, 2);
 
 verify_expectations();
 print "done!\n";
@@ -20,11 +20,11 @@ print "done!\n";
 	clean_test_db();
 ?>
 --EXPECTF--
-mysqlx://testuser:testpasswd@198.51.100.23:83/?connect-timeout=3
+mysqlx://testuser:testpasswd@198.51.100.23:33060/?connect-timeout=3
 ----------------------
 connecting time %f
 ______________________
-mysqlx://testuser:testpasswd@192.0.2.255:81/?connect-timeout=2
+mysqlx://testuser:testpasswd@192.0.2.254:3306/?connect-timeout=2
 ----------------------
 connecting time %f
 ______________________
diff --git a/tests/auth/timeout/timeout_utils.inc \
b/tests/auth/timeout/timeout_utils.inc index 2a62495..e367092 100644
--- a/tests/auth/timeout/timeout_utils.inc
+++ b/tests/auth/timeout/timeout_utils.inc
@@ -6,10 +6,10 @@ require_once(__DIR__."/../auth_utils.inc");
 $Default_connection_time_out = 10;
 //non-routable IP addresses basing on \
https://en.wikipedia.org/wiki/IPv4#Special_addresses  $Non_routable_host = \
                "198.51.100.23";
-$Non_routable_host1 = "192.0.2.255";
+$Non_routable_host1 = "192.0.2.254";
 $Non_routable_host2 = "203.0.113.4";
-$Non_routable_host3 = "198.51.100.255";
-$Non_routable_host4 = "203.0.113.255";
+$Non_routable_host3 = "198.51.100.8";
+$Non_routable_host4 = "192.0.2.2";
 
 function prepare_uri_with_timeout($host, $port, $timeout) {
 	global $scheme;


--
PECL CVS Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic