sashapolo commented on code in PR #1383:
URL: https://github.com/apache/ignite-3/pull/1383#discussion_r1037212068


##########
modules/metastorage-client/src/integrationTest/java/org/apache/ignite/internal/metastorage/client/ItMetaStorageServiceTest.java:
##########
@@ -908,38 +895,32 @@ public void testCursorsCleanup() throws Exception {
             return cursor;
         });
 
-        List<Peer> peers = List.of(new 
Peer(cluster.get(0).topologyService().localMember().name()));
+        List<String> peers = 
List.of(cluster.get(0).topologyService().localMember().name());
 
-        RaftGroupService metaStorageRaftGrpSvc = RaftGroupServiceImpl.start(
-                INSTANCE,
-                cluster.get(1),
-                FACTORY,
-                10_000,
-                peers,
-                true,
-                200,
-                executor
-        ).get(3, TimeUnit.SECONDS);
+        MetaStorageService metaStorageSvc2 = raftManagers.get(1)
+                .startRaftGroupService(INSTANCE, peers, List.of())
+                .thenApply(service -> new MetaStorageServiceImpl(service, 
NODE_ID_1, NODE_ID_1))
+                .get(3, TimeUnit.SECONDS);
 
-        try {
-            MetaStorageService metaStorageSvc2 = new 
MetaStorageServiceImpl(metaStorageRaftGrpSvc, NODE_ID_1, NODE_ID_1);
+        Cursor<Entry> cursorNode0 = 
metaStorageSvc.range(EXPECTED_RESULT_ENTRY.key(), null);
 
-            Cursor<Entry> cursorNode0 = 
metaStorageSvc.range(EXPECTED_RESULT_ENTRY.key(), null);
+        assertTrue(cursorNode0.hasNext());
 
-            Cursor<Entry> cursor2Node0 = 
metaStorageSvc.range(EXPECTED_RESULT_ENTRY.key(), null);
+        Cursor<Entry> cursor2Node0 = 
metaStorageSvc.range(EXPECTED_RESULT_ENTRY.key(), null);
 
-            final Cursor<Entry> cursorNode1 = 
metaStorageSvc2.range(EXPECTED_RESULT_ENTRY.key(), null);
+        assertTrue(cursor2Node0.hasNext());
 
-            metaStorageSvc.closeCursors(NODE_ID_0).get();
+        Cursor<Entry> cursorNode1 = 
metaStorageSvc2.range(EXPECTED_RESULT_ENTRY.key(), null);
 
-            assertThrows(NoSuchElementException.class, () -> 
cursorNode0.iterator().next());
+        assertTrue(cursorNode1.hasNext());
 
-            assertThrows(NoSuchElementException.class, () -> 
cursor2Node0.iterator().next());
+        metaStorageSvc.closeCursors(NODE_ID_0).get();
 
-            assertEquals(EXPECTED_RESULT_ENTRY, 
(cursorNode1.iterator().next()));
-        } finally {
-            metaStorageRaftGrpSvc.shutdown();

Review Comment:
   my bad, let's bring it back



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