alievmirza commented on a change in pull request #446:
URL: https://github.com/apache/ignite-3/pull/446#discussion_r755207638



##########
File path: 
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/MetaStorageManager.java
##########
@@ -275,6 +279,8 @@ public void stop() {
             LOG.error("Failed to get meta storage raft group service.");
 
             throw new IgniteInternalException(e);
+        } catch (NodeStoppingException e) {
+            throw new AssertionError("Loza was stopped before Metastore", e);

Review comment:
       Meta Storage manager

##########
File path: 
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/MetaStorageManager.java
##########
@@ -190,13 +190,17 @@ public void start() {
             }
 
             storage.start();
-
-            raftGroupServiceFut = raftMgr.prepareRaftGroup(
-                    METASTORAGE_RAFT_GROUP_NAME,
-                    metaStorageMembers,
-                    () -> new MetaStorageListener(storage)
-            );
-
+    
+            try {
+                raftGroupServiceFut = raftMgr.prepareRaftGroup(
+                        METASTORAGE_RAFT_GROUP_NAME,
+                        metaStorageMembers,
+                        () -> new MetaStorageListener(storage)
+                );
+            } catch (NodeStoppingException e) {
+                throw new AssertionError("Loza was stopped before Metastore", 
e);

Review comment:
       Meta Storage manager

##########
File path: 
modules/table/src/test/java/org/apache/ignite/internal/table/TableManagerTest.java
##########
@@ -312,19 +318,25 @@ public void tableManagerStopTest() {
 
     /**
      * Instantiates a table and prepares Table manager.
+     *
+     * @throws Exception If failed.
      */
     @Test
-    public void testGetTableDuringCreation() {
+    public void testGetTableDuringCreation() throws Exception {
         TableDefinition scmTbl = SchemaBuilders.tableBuilder("PUBLIC", 
DYNAMIC_TABLE_FOR_DROP_NAME).columns(
                 SchemaBuilders.column("key", 
ColumnType.INT64).asNonNull().build(),
                 SchemaBuilders.column("val", 
ColumnType.INT64).asNullable().build()
         ).withPrimaryKey("key").build();
-
+    
         Phaser phaser = new Phaser(2);
-
-        CompletableFuture<Table> createFut = CompletableFuture.supplyAsync(() 
->
-                mockManagersAndCreateTableWithDelay(scmTbl, tblManagerFut, 
phaser)
-        );
+    
+        CompletableFuture<Table> createFut = CompletableFuture.supplyAsync(() 
-> {
+            try {
+                return mockManagersAndCreateTableWithDelay(scmTbl, 
tblManagerFut, phaser);
+            } catch (NodeStoppingException e) {
+                throw new RuntimeException(e);

Review comment:
       we could use fail() method




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