Skip to content

Commit 9fed899

Browse files
authored
Fix tests
Fix tests
2 parents f506ef4 + bcb5ec3 commit 9fed899

9 files changed

+15
-13
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ jobs:
6161
run: ./vendor/bin/phpunit \
6262
--coverage-text \
6363
--whitelist src \
64-
--colors=never \
64+
--testdox \
6565
tests

tests/CheckParamsInRetryTransactionTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class CheckParamsInRetryTransactionTest extends TestCase
1313
{
14-
public function testRun()
14+
public function testCheckThrowExceptionsInRetryTransaction()
1515
{
1616
$config = [
1717

@@ -49,5 +49,7 @@ public function testRun()
4949
self::assertEquals(1,1);
5050
}
5151

52+
$table->retryTransaction(function (Session $session){});
53+
5254
}
5355
}

tests/CheckRefreshTokenRatioTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class CheckRefreshTokenRatioTest extends TestCase
1111
{
12-
public function testAnonymousConnection()
12+
public function testRefreshTokenRatio()
1313
{
1414
$awaitException = [0, 1];
1515
$awaitNormal = [0.05, 0.9];

tests/CheckTypeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
use YdbPlatform\Ydb\Ydb;
2525

2626
class CheckTypeTest extends TestCase{
27-
public function test(){
27+
public function testCheckTypesInDeclare(){
2828
$config = [
2929

3030
// Database path
@@ -146,7 +146,7 @@ public function test(){
146146
"Timestamp" => [
147147
"class" => TimestampType::class,
148148
"values" => [
149-
"2023-06-14 17:12:15.023476",
149+
"2023-06-14 17:12:15.023476",
150150
"2023-06-14 17:12:15.000000"
151151
]
152152
]

tests/PreparedQueryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class PreparedQueryTest extends TestCase
1010
{
11-
public function test(){
11+
public function testPreparedQuery(){
1212
$config = [
1313

1414
// Database path

tests/RefreshTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static function getMeta(\YdbPlatform\Ydb\Session $session){
4545

4646
class RefreshTokenTest extends TestCase
4747
{
48-
public function test(){
48+
public function testRefreshToken(){
4949

5050
$counter = 0;
5151

tests/RetryOnExceptionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class RetryOnExceptionTest extends TestCase
2727
*/
2828
private $oldSessionId;
2929

30-
public function test(){
30+
public function testRetryOnExceptionInRetry(){
3131

3232
$config = [
3333

tests/RetryParamsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
use YdbPlatform\Ydb\Retry\Retry;
3131

3232
class RetrySubclass extends Retry{
33-
public function canRetry(Exception $e, bool $idempotent)
33+
public function canRetry(\Exception $e, bool $idempotent)
3434
{
3535
return parent::canRetry($e, $idempotent);
3636
}
@@ -364,7 +364,7 @@ class RetryParamsTest extends \PHPUnit\Framework\TestCase
364364
]
365365
],
366366
];
367-
public function test(){
367+
public function testBackoffTypesAndDeleteSessionOnException(){
368368

369369
$retryParams = new RetryParams(1000, new Backoff(6,self::FAST),
370370
new Backoff(6,self::SLOW));

tests/TestEnvTypes.php renamed to tests/TestEnvTypesTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
use YdbPlatform\Ydb\Ydb;
77
use YdbPlatform\Ydb\YdbTable;
88

9-
class TestEnvTypes extends TestCase{
9+
class TestEnvTypesTest extends TestCase{
1010

11-
public function testEnvTypes(){
11+
public function testEnvironCredentials(){
1212

1313
$dataset = [
1414
[
1515
"env" => [
1616
"name" => "YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS",
17-
"value" => "./some.json"
17+
"value" => "./tests/some.json"
1818
],
1919
"wait" => "SA JSON key"
2020
],

0 commit comments

Comments
 (0)