rpuch commented on code in PR #7232:
URL: https://github.com/apache/ignite-3/pull/7232#discussion_r2619490715
##########
modules/index/src/integrationTest/java/org/apache/ignite/internal/index/ItBuildIndexWriteIntentsHandlingTest.java:
##########
@@ -20,56 +20,33 @@
import static java.util.concurrent.TimeUnit.SECONDS;
import static
org.apache.ignite.internal.ClusterPerClassIntegrationTest.isIndexAvailable;
import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
-import static
org.apache.ignite.internal.catalog.CatalogService.DEFAULT_STORAGE_PROFILE;
-import static
org.apache.ignite.internal.index.ItBuildIndexTest.getIndexDescriptor;
+import static org.apache.ignite.internal.index.IndexBuildTestUtils.INDEX_NAME;
+import static org.apache.ignite.internal.index.IndexBuildTestUtils.TABLE_NAME;
+import static
org.apache.ignite.internal.index.IndexBuildTestUtils.createTestTable;
import static
org.apache.ignite.internal.index.WriteIntentSwitchControl.disableWriteIntentSwitchExecution;
-import static org.apache.ignite.internal.lang.IgniteStringFormatter.format;
-import static org.apache.ignite.internal.table.TableTestUtils.getIndexStrict;
import static
org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.willCompleteSuccessfully;
import static org.awaitility.Awaitility.await;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.util.List;
-import java.util.Objects;
import java.util.concurrent.CompletableFuture;
-import org.apache.ignite.Ignite;
import org.apache.ignite.internal.ClusterPerTestIntegrationTest;
-import org.apache.ignite.internal.TestWrappers;
-import org.apache.ignite.internal.app.IgniteImpl;
-import org.apache.ignite.internal.catalog.descriptors.CatalogIndexDescriptor;
import
org.apache.ignite.internal.index.message.IsNodeFinishedRwTransactionsStartedBeforeRequest;
-import org.apache.ignite.internal.storage.StorageException;
-import org.apache.ignite.internal.storage.index.IndexRow;
-import org.apache.ignite.internal.storage.index.IndexStorage;
-import org.apache.ignite.internal.storage.index.SortedIndexStorage;
-import org.apache.ignite.internal.table.TableViewInternal;
import org.apache.ignite.internal.tx.message.WriteIntentSwitchReplicaRequest;
-import org.apache.ignite.internal.util.Cursor;
-import org.apache.ignite.sql.IgniteSql;
-import org.apache.ignite.table.Table;
import org.apache.ignite.tx.Transaction;
-import org.jetbrains.annotations.Nullable;
import org.junit.jupiter.api.Test;
class ItBuildIndexWriteIntentsHandlingTest extends
ClusterPerTestIntegrationTest {
- private static final String ZONE_NAME = "ZONE_TABLE";
-
- private static final String TABLE_NAME = "TEST_TABLE";
-
- private static final String INDEX_NAME = "TEST_INDEX";
-
@Test
void writeIntentFromTxAbandonedBeforeShouldNotBeIndexed() {
- createTable(1, 1);
+ createTestTable(cluster, 1, 1);
disableWriteIntentSwitchExecution(cluster);
// Create and abandon a transaction.
int txCoordinatorOrdinal = 2;
Transaction tx =
cluster.node(txCoordinatorOrdinal).transactions().begin();
- insertDataInTransaction(tx, TABLE_NAME, List.of("I0", "I1"), new
Object[]{1, 1});
+ insertDataInTransaction(tx, TABLE_NAME, List.of("I0", "I1"), new
Object[][]{new Object[]{1, 1}});
Review Comment:
I simplified the code; it doesn't seem we need to extract a constant now as
it basically does not matters which values are inserted
--
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]