Increase guzzle timeout when running tests (#485)

* increase guzzle timeout when running tests

* catch correct exception
This commit is contained in:
Boy132 2024-07-20 17:18:45 +02:00 committed by GitHub
parent 56b4938dc2
commit 56484a2282
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -41,6 +41,8 @@ jobs:
DB_HOST: 127.0.0.1 DB_HOST: 127.0.0.1
DB_DATABASE: testing DB_DATABASE: testing
DB_USERNAME: root DB_USERNAME: root
GUZZLE_TIMEOUT: 60
GUZZLE_CONNECT_TIMEOUT: 60
steps: steps:
- name: Code Checkout - name: Code Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -113,6 +115,8 @@ jobs:
DB_HOST: 127.0.0.1 DB_HOST: 127.0.0.1
DB_DATABASE: testing DB_DATABASE: testing
DB_USERNAME: root DB_USERNAME: root
GUZZLE_TIMEOUT: 60
GUZZLE_CONNECT_TIMEOUT: 60
steps: steps:
- name: Code Checkout - name: Code Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -173,6 +177,8 @@ jobs:
QUEUE_CONNECTION: sync QUEUE_CONNECTION: sync
DB_CONNECTION: sqlite DB_CONNECTION: sqlite
DB_DATABASE: testing.sqlite DB_DATABASE: testing.sqlite
GUZZLE_TIMEOUT: 60
GUZZLE_CONNECT_TIMEOUT: 60
steps: steps:
- name: Code Checkout - name: Code Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@ -4,7 +4,7 @@ namespace App\Services\Helpers;
use GuzzleHttp\Client; use GuzzleHttp\Client;
use Carbon\CarbonImmutable; use Carbon\CarbonImmutable;
use GuzzleHttp\Exception\ClientException; use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Support\Arr; use Illuminate\Support\Arr;
use Illuminate\Contracts\Cache\Repository as CacheRepository; use Illuminate\Contracts\Cache\Repository as CacheRepository;
@ -110,7 +110,7 @@ class SoftwareVersionService
$wingsData = json_decode($response->getBody(), true); $wingsData = json_decode($response->getBody(), true);
$versionData['daemon'] = trim($wingsData['tag_name'], 'v'); $versionData['daemon'] = trim($wingsData['tag_name'], 'v');
} }
} catch (ClientException $e) { } catch (GuzzleException $e) {
} }
$versionData['discord'] = 'https://pelican.dev/discord'; $versionData['discord'] = 'https://pelican.dev/discord';