xtern commented on code in PR #1501:
URL: https://github.com/apache/ignite-3/pull/1501#discussion_r1086592329


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/table/ItTableScanTest.java:
##########
@@ -768,4 +789,26 @@ private static Row createKeyRow(int id) {
 
         return new Row(SCHEMA, new ByteBufferRow(rowBuilder.toBytes()));
     }
+
+    /**
+     * Starts an RW transaction and enlists the specified partition in it.
+     *
+     * @param partId Partition ID.
+     * @return Transaction.
+     */
+    private InternalTransaction startTxWithEnlistedPartition(int partId) {
+        Ignite ignite = CLUSTER_NODES.get(0);
+
+        InternalTransaction tx = (InternalTransaction) 
ignite.transactions().begin();
+
+        InternalTable table = ((TableImpl) 
ignite.tables().table(TABLE_NAME)).internalTable();
+        TablePartitionId tblPartId = new TablePartitionId(table.tableId(), 
partId);
+        RaftGroupService raftSvc = table.partitionRaftGroupService(partId);
+        long term = raftSvc.refreshAndGetLeaderWithTerm().join().term();

Review Comment:
   oops... sorry
   
   Fixed in tests, thanks.



-- 
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]

Reply via email to