Skip to content

Commit 92f8640

Browse files
fix(ci): Increase the time we wait between requests
Refs: #163
1 parent fb6b661 commit 92f8640

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ jobs:
7070
env:
7171
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
7272
SLACK_TEST_CHANNEL: ${{ secrets.SLACK_TEST_CHANNEL }}
73-
CI: ${{ vars.CI }}
73+
CI: true

tests/ClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function testAllCursorPaginationMethodExists()
6363
$method = lcfirst(str_replace('iterate', '', $methodName));
6464

6565
if ($_SERVER['CI'] ?? false) {
66-
sleep(5); // @see https://github.com/jolicode/slack-php-api/issues/163
66+
sleep(10); // @see https://github.com/jolicode/slack-php-api/issues/163
6767
}
6868

6969
$responseFromMethod = $client->{$method}($this->argumentsForCursorPaginationRequest($method, $client));

tests/SlackTokenDependentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function createClient(?string $token = null): Client
3131
// On GitHub Action, we get rate limit issues with Slack API calls because tests are run in parallel
3232
// This "sleep" method tries to share the load.
3333
if ($_SERVER['CI'] ?? false) {
34-
sleep(5); // @see https://github.com/jolicode/slack-php-api/issues/163
34+
sleep(10); // @see https://github.com/jolicode/slack-php-api/issues/163
3535
}
3636

3737
return ClientFactory::create(null === $token ? $_SERVER['SLACK_TOKEN'] : $token);

tests/WritingTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function testItCanPostAMessageAndThenAThreadResponse(): void
8989
]);
9090

9191
if ($_SERVER['CI'] ?? false) {
92-
sleep(5); // @see https://github.com/jolicode/slack-php-api/issues/163
92+
sleep(10); // @see https://github.com/jolicode/slack-php-api/issues/163
9393
}
9494

9595
$response2 = $client->chatPostMessage([
@@ -155,9 +155,9 @@ public function testItCanMarkConversation(): void
155155
$ts = $response->getTs();
156156

157157
if ($_SERVER['CI'] ?? false) {
158-
sleep(5); // @see https://github.com/jolicode/slack-php-api/issues/163
158+
sleep(10); // @see https://github.com/jolicode/slack-php-api/issues/163
159159
}
160-
160+
161161
$markResponse = $client->conversationsMark([
162162
'channel' => $_SERVER['SLACK_TEST_CHANNEL'],
163163
'ts' => $ts,

0 commit comments

Comments
 (0)