Skip to content

Commit 5f06a02

Browse files
committed
Fix tests
1 parent d293fb5 commit 5f06a02

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

tests/PreparedQueryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function test(){
2929
$ydb = new Ydb($config);
3030
$table = $ydb->table();
3131

32-
$session = $table->session();
32+
$session = $table->createSession();
3333

3434
$prepared_query = $ydb->table()->session()->prepare('
3535
declare $pk as Int64;

tests/RefreshTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function test(){
7070
];
7171
$ydb = new Ydb($config);
7272
$table = $ydb->table();
73-
$session = $table->session();
73+
$session = $table->createSession();
7474
$token = MetaGetter::getMeta($session)["x-ydb-auth-ticket"][0];
7575
self::assertEquals(
7676
1,

tests/RetryOnBadSessionTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use PHPUnit\Framework\TestCase;
66
use YdbPlatform\Ydb\Auth\Implement\AnonymousAuthentication;
7+
use YdbPlatform\Ydb\Table;
78
use YdbPlatform\Ydb\Ydb;
89

910
class SessionManager extends \YdbPlatform\Ydb\Session{
@@ -39,14 +40,15 @@ public function test(){
3940
];
4041
$ydb = new Ydb($config);
4142
$table = $ydb->table();
42-
$session = $table->session();
43+
$session = $table->createSession();
4344
$oldSessionId = SessionManager::getSessionId($session);
4445
$session->delete();
45-
$session = $table->session();
46+
$session = $table->createSession();
4647
SessionManager::setSessionId($session,$oldSessionId);
48+
$tres = $session->query('select 1 as res')->rows()[0]['res'];
4749
self::assertEquals(
4850
1,
49-
$session->query('select 1 as res')->rows()[0]['res']
51+
$tres
5052
);
5153
}
5254
}

tests/RunTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private function getYdbResult(array $config) : array
3838
$ydb = new Ydb($config);
3939
$table = $ydb->table();
4040

41-
$session = $table->session();
41+
$session = $table->createSession();
4242

4343
$session->createTable(
4444
'episodes',

0 commit comments

Comments
 (0)