sanpwc commented on a change in pull request #703:
URL: https://github.com/apache/ignite-3/pull/703#discussion_r819674123
##########
File path:
modules/table/src/test/java/org/apache/ignite/internal/table/InteropOperationsTest.java
##########
@@ -116,6 +125,26 @@
TxManager txManager = new TxManagerImpl(clusterService, new
HeapLockManager());
txManager.start();
+ MessagingService messagingService =
Mockito.mock(MessagingService.class, RETURNS_DEEP_STUBS);
+
Mockito.when(clusterService.messagingService()).thenReturn(messagingService);
+
+ doAnswer(
+ invocationClose -> {
+ assert invocationClose.getArgument(1) instanceof
TxFinishRequest;
+
+ TxFinishRequest txFinishRequest =
invocationClose.getArgument(1);
+
+ if (txFinishRequest.commit()) {
+
txManager.commitAsync(txFinishRequest.timestamp()).get();
+ } else {
+
txManager.rollbackAsync(txFinishRequest.timestamp()).get();
+ }
+
+ return
CompletableFuture.completedFuture(mock(TxFinishResponse.class));
+ }
+ ).when(messagingService)
+ .invoke(any(NetworkAddress.class), any(TxFinishRequest.class),
anyLong());
Review comment:
Fixed.
--
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]