AMashenkov commented on a change in pull request #8229:
URL: https://github.com/apache/ignite/pull/8229#discussion_r485852644



##########
File path: 
modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/LongDestroyDurableBackgroundTaskTest.java
##########
@@ -584,6 +584,47 @@ public void testDestroyTaskLifecycle() throws Exception {
         assertTrue(taskLifecycleListener.check());
     }
 
+    /**
+     * Tests that index is correctly deleted when corresponding SQL table is 
deleted.
+     *
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testRemoveIndexesOnTableDrop() throws Exception {
+        IgniteEx ignite = startGrids(1);
+
+        ignite.cluster().active(true);
+
+        IgniteCache<Integer, Integer> cache = 
ignite.getOrCreateCache(DEFAULT_CACHE_NAME);
+
+        query(cache, "create table t1 (id integer primary key, p integer, f 
integer) with \"BACKUPS=1, CACHE_GROUP=grp_test_table\"");
+
+        query(cache, "create table t2 (id integer primary key, p integer, f 
integer) with \"BACKUPS=1, CACHE_GROUP=grp_test_table\"");
+
+        query(cache, "create index t2_idx on t2 (p)");
+
+        for (int i = 0; i < 5_000; i++)

Review comment:
       Would you mind to rewrite this with bulk insert or using prepared 
statement to save few sec on TC?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to