diff --git a/tests/integrational/AddChannelChannelGroupEndpointTest.php b/tests/integrational/AddChannelChannelGroupEndpointTest.php index c57d9560..6a4d0998 100644 --- a/tests/integrational/AddChannelChannelGroupEndpointTest.php +++ b/tests/integrational/AddChannelChannelGroupEndpointTest.php @@ -51,6 +51,7 @@ public function testGroupMissing() $addChannelChannelGroup->channels(["c|h1", "ch2s"])->sync(); } + // my comment public function testGroupIsEmpty() { $this->expectException(PubNubValidationException::class); diff --git a/tests/integrational/PublishTest.php b/tests/integrational/PublishTest.php index 61fba0df..3b689955 100644 --- a/tests/integrational/PublishTest.php +++ b/tests/integrational/PublishTest.php @@ -12,6 +12,8 @@ class PublishTest extends \PubNubTestCase { + private const PUBLISH_DELAY_MILLISECONDS = 1000; + /** * @param Publish $publish */ @@ -29,10 +31,19 @@ private function assertSuccess($publish) $this->assertEquals($result->getTimetoken(), $envelope->getResult()->getTimetoken()); + $this->delayBetweenPublishes(); + $publish->clear(); $result2 = $publish->sync(); $this->assertNotEquals($result->getTimetoken(), $result2->getTimetoken()); + + $this->delayBetweenPublishes(); + } + + private function delayBetweenPublishes(): void + { + usleep(self::PUBLISH_DELAY_MILLISECONDS * 1000); } /**