Skip to content

Commit 98d1272

Browse files
committed
Some fixes to make the test more reliable.
1 parent d0028bf commit 98d1272

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cake/tests/cases/libs/cake_socket.test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ function testSocketReading() {
145145
$this->Socket->connect();
146146
$this->assertEqual($this->Socket->read(26), null);
147147

148-
$config = array('host' => '127.0.0.1', 'timeout' => 1);
148+
$config = array('host' => '127.0.0.1', 'timeout' => 0.5);
149149
$this->Socket = new CakeSocket($config);
150150
$this->assertTrue($this->Socket->connect());
151151
$this->assertFalse($this->Socket->read(1024 * 1024));
152152
$this->assertEqual($this->Socket->lastError(), '2: ' . __('Connection timed out'));
153153

154-
$config = array('host' => 'localhost', 'timeout' => 30);
154+
$config = array('host' => 'cakephp.org', 'port' => 80, 'timeout' => 20);
155155
$this->Socket = new CakeSocket($config);
156156
$this->assertTrue($this->Socket->connect());
157157
$this->assertEqual($this->Socket->read(26), null);

0 commit comments

Comments
 (0)