valepakh commented on code in PR #5259:
URL: https://github.com/apache/ignite-3/pull/5259#discussion_r1965169696
##########
modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/transaction/ItTransactionControllerTest.java:
##########
@@ -142,6 +140,34 @@ void shouldReturnProblemIfCancelNonExistingTransaction() {
);
}
+ @Test
+ void shouldCancelTransaction() {
+ Transaction roTx = node(0).transactions().begin(new
TransactionOptions().readOnly(true));
+ Transaction rwTx = node(0).transactions().begin(new
TransactionOptions().readOnly(false));
+
+ TransactionInfo roTransactionInfo = getTransaction(client,
((InternalTransaction) roTx).id());
+ assertThat(roTransactionInfo, notNullValue());
+
+ cancelTransaction(client, roTransactionInfo.id());
+
+ assertThrowsProblem(
+ () -> getTransaction(client, roTransactionInfo.id()),
+ NOT_FOUND,
+ isProblem().withDetail("Transaction not found [transactionId="
+ roTransactionInfo.id() + "]")
+ );
+
+ TransactionInfo rwTransactionInfo = getTransaction(client,
((InternalTransaction) rwTx).id());
Review Comment:
+1 to
```
@ParameterizedTest
@ValueSource(booleans = {true, false})
void shouldCancelTransaction(boolean readOnly) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]