Commit 3b5d8860 authored by Chris Graham's avatar Chris Graham
Browse files

Fixed MANTIS-3948

parent b0438758
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -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);
@@ -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)
    {