File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ public class DriverConfig
3232 internal TimeSpan EndpointDiscoveryInterval = TimeSpan . FromMinutes ( 1 ) ;
3333 internal TimeSpan EndpointDiscoveryTimeout = TimeSpan . FromSeconds ( 10 ) ;
3434 internal string SdkVersion { get ; }
35+
3536 public DriverConfig (
3637 string endpoint ,
3738 string database ,
Original file line number Diff line number Diff line change 1+ using Xunit ;
2+ using Ydb . Sdk . Services . Query ;
3+ using Ydb . Sdk . Tests . Fixture ;
4+
5+ namespace Ydb . Sdk . Tests . Sys ;
6+
7+ [ Trait ( "Category" , "Integration" ) ]
8+ public class QueryLogTests : IClassFixture < QueryClientFixture >
9+ {
10+ private readonly QueryClient _queryClient ;
11+
12+ public QueryLogTests ( QueryClientFixture queryClientFixture )
13+ {
14+ _queryClient = queryClientFixture . QueryClient ;
15+ }
16+
17+ [ Fact ]
18+ public async Task QueryLogPidCheck ( )
19+ {
20+ const string sql = @"SELECT * FROM `.sys/query_sessions`" ;
21+ var expectedPid = Environment . ProcessId . ToString ( ) ;
22+
23+ await _queryClient . Exec ( sql ) ;
24+ var selectAllQueries = await _queryClient . ReadAllRows ( sql ) ;
25+
26+ Assert . NotEmpty ( selectAllQueries ) ;
27+ Assert . Equal ( selectAllQueries [ 0 ] [ "ClientPID" ] . GetOptionalUtf8 ( ) , expectedPid ) ;
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments