Skip to content

Commit 04d2acf

Browse files
committed
Fix test
1 parent 8dca72d commit 04d2acf

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI test connection
1+
name: CI tests
22

33
on:
44
pull_request:
@@ -9,7 +9,7 @@ permissions:
99
contents: read
1010

1111
jobs:
12-
build:
12+
tests:
1313
services:
1414
ydb:
1515
image: cr.yandex/yc/yandex-docker-local-ydb:stable-22-5
@@ -23,7 +23,9 @@ jobs:
2323
YDB_USE_IN_MEMORY_PDISKS: true
2424
options: '-h localhost'
2525
runs-on: ubuntu-latest
26-
26+
strategy:
27+
matrix:
28+
php-versions: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
2729
steps:
2830
- uses: actions/checkout@v3
2931
name: Checkout
@@ -38,7 +40,7 @@ jobs:
3840
id: php
3941
with:
4042
extensions: grpc
41-
php-version: 7.4
43+
php-version: ${{ matrix.php-versions }}
4244

4345
- run: composer validate --strict
4446
name: Validate composer.json and composer.lock

src/Auth/TokenInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(string $token, int $expiresAt)
1919
{
2020
$this->token = $token;
2121
$this->expiresAt = $expiresAt;
22-
$this->refreshAt = time() + 0.1*($this->expiresAt-time());
22+
$this->refreshAt = time() + ceil(0.1*($this->expiresAt-time()));
2323
}
2424

2525
/**

tests/RefreshTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getTokenInfo(): TokenInfo
2525
if ($this->counter==2){
2626
throw new \Exception("Some error");
2727
}
28-
return new TokenInfo(time()+3,time()+3);
28+
return new TokenInfo(time()+10,time()+10);
2929
}
3030

3131
public function getName(): string

0 commit comments

Comments
 (0)