Skip to content

Commit

Permalink
Some fixes to make the test more reliable.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 25, 2010
1 parent d0028bf commit 98d1272
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cake/tests/cases/libs/cake_socket.test.php
Expand Up @@ -145,13 +145,13 @@ function testSocketReading() {
$this->Socket->connect();
$this->assertEqual($this->Socket->read(26), null);

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

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

0 comments on commit 98d1272

Please sign in to comment.