Skip to content

Commit

Permalink
Fixed NPE for keepAlive
Browse files Browse the repository at this point in the history
  • Loading branch information
alex268 committed Jan 20, 2025
1 parent 1c6c428 commit d30d2ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public boolean isValid(YdbValidator validator, int timeout) throws SQLException
try {
KeepAliveSessionSettings settings = new KeepAliveSessionSettings().setTimeout(Duration.ofSeconds(timeout));
Session.State keepAlive = validator.call(
"Keep alive: " + tx.txID(), null,
"Keep alive: " + tx.txID(),
() -> session.keepAlive(settings)
);
return keepAlive == Session.State.READY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ private JdbcConnectionExtention(JdbcUrlHelper jdbcURL) {
public JdbcConnectionExtention(YdbHelperExtension ydb, boolean autoCommit) {
this(new JdbcUrlHelper(ydb)
.withArg("failOnTruncatedResult", "true")
.withArg("enableTxTracer", "true")
.withArg("autoCommit", String.valueOf(autoCommit))
// .withArg("useQueryService", "true")
// .withArg("useQueryService", "false")
);
}

Expand Down

0 comments on commit d30d2ef

Please sign in to comment.