Skip to content

Commit

Permalink
Expand waiting duration to 20 seconds.
Browse files Browse the repository at this point in the history
  • Loading branch information
vistart committed Oct 1, 2021
1 parent 251a825 commit 032fb0f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/user/message/RedisMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function testRead()
$this->assertTrue($message->save());
$message_id = $message->getGUID();

sleep(10);
sleep(20);
$this->assertEquals(0, RedisMessage::find()->byIdentity($this->user)->read()->count());
$this->assertEquals(1, RedisMessage::find()->byIdentity($this->user)->unread()->count());
$this->assertEquals(0, RedisMessage::find()->byIdentity($this->other)->read()->count());
Expand Down Expand Up @@ -216,7 +216,8 @@ public function testReceived()
/* @var $message RedisMessage */
$this->assertTrue($message->save());
$message_id = $message->getGUID();


sleep(20);
$this->assertEquals(0, RedisMessage::find()->byIdentity($this->user)->received()->count());
$this->assertEquals(1, RedisMessage::find()->byIdentity($this->user)->unreceived()->count());
$this->assertEquals(0, RedisMessage::find()->byIdentity($this->other)->received()->count());
Expand Down Expand Up @@ -320,7 +321,7 @@ public function testPagination()

$pagination = RedisMessage::getPagination();
/* @var $pagination \yii\data\Pagination */
sleep(10);
sleep(20);
$this->assertEquals(1, $pagination->limit);
$this->assertEquals(1, $pagination->totalCount);

Expand Down

0 comments on commit 032fb0f

Please sign in to comment.