Skip to content

Commit

Permalink
QueryService: Rewrite tests
Browse files Browse the repository at this point in the history
  • Loading branch information
XmasApple committed Nov 14, 2023
1 parent 29123b1 commit a9fe3f6
Show file tree
Hide file tree
Showing 3 changed files with 199 additions and 346 deletions.
10 changes: 7 additions & 3 deletions src/Ydb.Sdk/src/Services/Query/QueryClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -685,12 +685,16 @@ public async Task<QueryResponseWithResult<T>> DoTx<T>(Func<Tx, Task<T>> func,
}
catch (StatusUnsuccessfulException e)
{
return await Rollback<T>(session, tx, e.Status);
var rollbackResponse = await Rollback<T>(session, tx, e.Status);
return rollbackResponse;
}
catch (Exception e)
{
return await Rollback<T>(session, tx,
new Status(StatusCode.InternalError, $"Failed to execute lambda on tx {tx.TxId}: {e.Message}"));
var status = new Status(
StatusCode.InternalError,
$"Failed to execute lambda on tx {tx.TxId}: {e.Message}");
var rollbackResponse = await Rollback<T>(session, tx, status);
return rollbackResponse;
}
// var commitResponse = await CommitTransaction(session.Id, tx);
Expand Down
343 changes: 0 additions & 343 deletions src/Ydb.Sdk/tests/Query/TestExecuteQuery.cs

This file was deleted.

Loading

0 comments on commit a9fe3f6

Please sign in to comment.