@@ -14,8 +14,7 @@ public YdbAdoUserPasswordTests(YdbFactoryFixture fixture) : base(fixture)
1414 [ Fact ]
1515 public async Task Authentication_WhenUserAndPassword_ReturnValidConnection ( )
1616 {
17- await using var connection = new YdbConnection ( Fixture . ConnectionString ) ;
18- await connection . OpenAsync ( ) ;
17+ await using var connection = await CreateOpenConnectionAsync ( ) ;
1918 var ydbCommand = connection . CreateCommand ( ) ;
2019 var kurdyukovkirya = "kurdyukovkirya" + Random . Shared . Next ( ) ;
2120 ydbCommand . CommandText = $ "CREATE USER { kurdyukovkirya } PASSWORD 'password'";
@@ -29,8 +28,7 @@ public async Task Authentication_WhenUserAndPassword_ReturnValidConnection()
2928 ydbCommand . CommandText = "SELECT 1 + 2" ;
3029 Assert . Equal ( 3 , await ydbCommand . ExecuteScalarAsync ( ) ) ;
3130
32- await using var newConnection = new YdbConnection ( Fixture . ConnectionString ) ;
33- await newConnection . OpenAsync ( ) ;
31+ await using var newConnection = await CreateOpenConnectionAsync ( ) ;
3432 ydbCommand = newConnection . CreateCommand ( ) ;
3533 ydbCommand . CommandText = $ "DROP USER { kurdyukovkirya } ;";
3634 await ydbCommand . ExecuteNonQueryAsync ( ) ;
@@ -39,8 +37,7 @@ public async Task Authentication_WhenUserAndPassword_ReturnValidConnection()
3937 [ Fact ]
4038 public async Task ExecuteNonQueryAsync_WhenCreateUser_ReturnEmptyResultSet ( )
4139 {
42- await using var connection = new YdbConnection ( Fixture . ConnectionString ) ;
43- await connection . OpenAsync ( ) ;
40+ await using var connection = await CreateOpenConnectionAsync ( ) ;
4441 var dbCommand = connection . CreateCommand ( ) ;
4542 var user = "user" + Random . Shared . Next ( ) ;
4643 dbCommand . CommandText = $ "CREATE USER { user } PASSWORD '123qweqwe'";
0 commit comments