Loading _tests/tests/unit_tests/http_timeouts.php +10 −6 Original line number Diff line number Diff line Loading @@ -44,9 +44,11 @@ class http_timeouts_test_set extends cms_test_case $r2 = $this->_testURLWrappers($url, $timeout); $this->assertTrue($r2[0]); $this->assertTrue($r2[1] == 27078913, 'Wrong download size @ ' . strval($r2[1])); if (strpos($url, 'https://') === false) { $r3 = $this->_testFSockOpen($url, $timeout); $this->assertTrue($r3[0]); $this->assertTrue($r3[1] >= 27078913, 'Wrong download size @ ' . strval($r3[1])); } // Test timeout being hit for something that really is timing out $url = get_base_url() . '/_tests/sleep.php?timeout=' . float_to_raw_string($timeout + 2); Loading @@ -56,10 +58,12 @@ class http_timeouts_test_set extends cms_test_case $r2 = $this->_testURLWrappers($url, $timeout); $this->assertTrue(!$r2[0]); $this->assertTrue($r2[1] == 0, 'Wrong download size @ ' . strval($r2[1])); if (strpos($url, 'https://') === false) { $r3 = $this->_testFSockOpen($url, $timeout); $this->assertTrue(!$r3[0]); $this->assertTrue($r3[1] == 0, 'Wrong download size @ ' . strval($r3[1])); } } protected function _testCurl($url, $timeout) { Loading Loading
_tests/tests/unit_tests/http_timeouts.php +10 −6 Original line number Diff line number Diff line Loading @@ -44,9 +44,11 @@ class http_timeouts_test_set extends cms_test_case $r2 = $this->_testURLWrappers($url, $timeout); $this->assertTrue($r2[0]); $this->assertTrue($r2[1] == 27078913, 'Wrong download size @ ' . strval($r2[1])); if (strpos($url, 'https://') === false) { $r3 = $this->_testFSockOpen($url, $timeout); $this->assertTrue($r3[0]); $this->assertTrue($r3[1] >= 27078913, 'Wrong download size @ ' . strval($r3[1])); } // Test timeout being hit for something that really is timing out $url = get_base_url() . '/_tests/sleep.php?timeout=' . float_to_raw_string($timeout + 2); Loading @@ -56,10 +58,12 @@ class http_timeouts_test_set extends cms_test_case $r2 = $this->_testURLWrappers($url, $timeout); $this->assertTrue(!$r2[0]); $this->assertTrue($r2[1] == 0, 'Wrong download size @ ' . strval($r2[1])); if (strpos($url, 'https://') === false) { $r3 = $this->_testFSockOpen($url, $timeout); $this->assertTrue(!$r3[0]); $this->assertTrue($r3[1] == 0, 'Wrong download size @ ' . strval($r3[1])); } } protected function _testCurl($url, $timeout) { Loading