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


##########
modules/index/src/integrationTest/java/org/apache/ignite/internal/index/ItBuildIndexTest.java:
##########
@@ -133,23 +137,115 @@ void testDropIndexDuringTransaction() throws Exception {
 
         checkIndexBuild(partitions, replicas, INDEX_NAME);
 
+        CompletableFuture<Void> indexRemovedFuture = indexRemovedFuture();
+
         IgniteImpl node = CLUSTER.aliveNode();
 
         // Start a transaction. We expect that the index will not be removed 
until this transaction completes.
-        Transaction tx = node.transactions().begin(new 
TransactionOptions().readOnly(false));
+        node.transactions().runInTransaction(tx -> {
+            dropIndex(INDEX_NAME);
+
+            CatalogIndexDescriptor indexDescriptor = 
node.catalogManager().index(INDEX_NAME, node.clock().nowLong());
+
+            assertThat(indexDescriptor, is(notNullValue()));
+            assertThat(indexDescriptor.status(), 
is(CatalogIndexStatus.STOPPING));

Review Comment:
   I thought about that, but I don't think it's common to wait for an event 
that is not supposed to happen. This will slow down the test and what is the 
correct amount of time to wait?



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