-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from RobinUS2/master
Timeout
- Loading branch information
Showing
6 changed files
with
71 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
language: php | ||
|
||
php: | ||
- 5.3 | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
namespace Jenner\RedisSentinel\Test; | ||
|
||
use Jenner\RedisSentinel\SentinelPool; | ||
|
||
class SentinelTimeoutTest extends SentinelPoolTest | ||
{ | ||
public function setUp() | ||
{ | ||
parent::setUp(); | ||
$this->sentinel_pool = new SentinelPool(); | ||
$this->sentinel_pool->addSentinel('127.0.0.1', 26379, 1.1); | ||
$this->sentinel_pool->addSentinel('127.0.0.1', 26380, 1.2); | ||
$this->sentinel_pool->addSentinel('127.0.0.1', 26381, 1.3); | ||
} | ||
|
||
public function testTimeout() | ||
{ | ||
// run command to populate current sentinel | ||
$this->assertEquals('+PONG', $this->sentinel_pool->ping()); | ||
|
||
$this->assertNotNull($this->sentinel_pool->getCurrentSentinel()); | ||
|
||
$this->assertEquals(1.1, $this->sentinel_pool->getCurrentSentinel()->getTimeout()); | ||
} | ||
} |