Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
atlasdb-tests-shared (#6884)
Browse files Browse the repository at this point in the history
  • Loading branch information
barisoyoruk authored Dec 4, 2023
1 parent 040f3d4 commit 05ba227
Show file tree
Hide file tree
Showing 78 changed files with 365 additions and 9,009 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
import com.palantir.atlasdb.keyvalue.api.TimestampRangeDelete;
import com.palantir.atlasdb.keyvalue.api.Value;
import com.palantir.atlasdb.keyvalue.impl.AbstractKeyValueService;
import com.palantir.atlasdb.keyvalue.impl.AbstractKeyValueServiceTestV2;
import com.palantir.atlasdb.keyvalue.impl.AbstractKeyValueServiceTest;
import com.palantir.atlasdb.keyvalue.impl.TableSplittingKeyValueService;
import com.palantir.atlasdb.logging.LoggingArgs;
import com.palantir.atlasdb.protos.generated.TableMetadataPersistence;
Expand Down Expand Up @@ -91,7 +91,7 @@
import org.junit.jupiter.api.extension.RegisterExtension;
import org.slf4j.Logger;

public abstract class AbstractCassandraKeyValueServiceIntegrationTest extends AbstractKeyValueServiceTestV2 {
public abstract class AbstractCassandraKeyValueServiceIntegrationTest extends AbstractKeyValueServiceTest {
private static final Logger logger = mock(Logger.class);
private static final MetricsManager metricsManager = MetricsManagers.createForTests();
private static final int FOUR_DAYS_IN_SECONDS = 4 * 24 * 60 * 60;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.palantir.atlasdb.containers.CassandraResource;
import com.palantir.atlasdb.keyvalue.api.KeyAlreadyExistsException;
import com.palantir.atlasdb.transaction.api.Transaction;
import com.palantir.atlasdb.transaction.impl.AbstractTransactionTestV2;
import com.palantir.atlasdb.transaction.impl.AbstractTransactionTest;
import com.palantir.atlasdb.transaction.impl.TransactionSchemaVersionEnforcement;
import com.palantir.atlasdb.transaction.impl.TransactionTables;
import com.palantir.atlasdb.transaction.service.SimpleTransactionService;
Expand All @@ -37,7 +37,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.RegisterExtension;

public abstract class AbstractCassandraKeyValueServiceTransactionIntegrationTest extends AbstractTransactionTestV2 {
public abstract class AbstractCassandraKeyValueServiceTransactionIntegrationTest extends AbstractTransactionTest {

@RegisterExtension
public static final CassandraResource CASSANDRA = new CassandraResource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
import com.palantir.atlasdb.sweep.queue.SweepQueueReader;
import com.palantir.atlasdb.sweep.queue.TargetedSweeper;
import com.palantir.atlasdb.transaction.api.Transaction;
import com.palantir.atlasdb.transaction.impl.AbstractSerializableTransactionTestV2;
import com.palantir.atlasdb.transaction.impl.AbstractSerializableTransactionTest;
import com.palantir.atlasdb.transaction.impl.TransactionSchemaVersionEnforcement;
import java.util.function.UnaryOperator;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.RegisterExtension;

public abstract class AbstractCassandraKvsSerializableTransactionTest extends AbstractSerializableTransactionTestV2 {
public abstract class AbstractCassandraKvsSerializableTransactionTest extends AbstractSerializableTransactionTest {
@RegisterExtension
public static final CassandraResource CASSANDRA = new CassandraResource();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

import com.palantir.atlasdb.containers.CassandraResource;
import com.palantir.atlasdb.keyvalue.api.KeyValueService;
import com.palantir.atlasdb.sweep.AbstractBackgroundSweeperIntegrationTestV2;
import com.palantir.atlasdb.sweep.AbstractBackgroundSweeperIntegrationTest;
import com.palantir.atlasdb.util.MetricsManagers;
import org.junit.jupiter.api.extension.RegisterExtension;

public class CassandraBackgroundSweeperIntegrationTest extends AbstractBackgroundSweeperIntegrationTestV2 {
public class CassandraBackgroundSweeperIntegrationTest extends AbstractBackgroundSweeperIntegrationTest {
@RegisterExtension
public static final CassandraResource CASSANDRA =
new CassandraResource(CassandraBackgroundSweeperIntegrationTest::createKeyValueService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
import com.palantir.atlasdb.containers.CassandraResource;
import com.palantir.atlasdb.encoding.PtBytes;
import com.palantir.atlasdb.keyvalue.api.ImmutableCandidateCellForSweeping;
import com.palantir.atlasdb.keyvalue.impl.AbstractGetCandidateCellsForSweepingTestV2;
import com.palantir.atlasdb.keyvalue.impl.AbstractGetCandidateCellsForSweepingTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

public class CassandraGetCandidateCellsForSweepingTest extends AbstractGetCandidateCellsForSweepingTestV2 {
public class CassandraGetCandidateCellsForSweepingTest extends AbstractGetCandidateCellsForSweepingTest {
@RegisterExtension
public static final CassandraResource CASSANDRA = new CassandraResource();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
package com.palantir.atlasdb.keyvalue.cassandra;

import com.palantir.atlasdb.containers.CassandraResource;
import com.palantir.atlasdb.keyvalue.impl.AbstractMultiCasTestV2;
import com.palantir.atlasdb.keyvalue.impl.AbstractMultiCasTest;
import org.junit.jupiter.api.extension.RegisterExtension;

public class CassandraKeyValueServiceMultiCasIntegrationTest extends AbstractMultiCasTestV2 {
public class CassandraKeyValueServiceMultiCasIntegrationTest extends AbstractMultiCasTest {
@RegisterExtension
public static final CassandraResource CASSANDRA = new CassandraResource();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
import com.palantir.atlasdb.keyvalue.api.KeyValueService;
import com.palantir.atlasdb.keyvalue.api.SweepResults;
import com.palantir.atlasdb.protos.generated.TableMetadataPersistence;
import com.palantir.atlasdb.sweep.AbstractSweepTaskRunnerTestV2;
import com.palantir.atlasdb.sweep.AbstractSweepTaskRunnerTest;
import com.palantir.atlasdb.util.MetricsManagers;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

public class CassandraKeyValueServiceSweepTaskRunnerIntegrationTest extends AbstractSweepTaskRunnerTestV2 {
public class CassandraKeyValueServiceSweepTaskRunnerIntegrationTest extends AbstractSweepTaskRunnerTest {
@RegisterExtension
public static final CassandraResource CASSANDRA =
new CassandraResource(CassandraKeyValueServiceSweepTaskRunnerIntegrationTest::createKeyValueService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
package com.palantir.atlasdb.keyvalue.cassandra;

import com.palantir.atlasdb.containers.CassandraResource;
import com.palantir.atlasdb.sweep.progress.AbstractSweepProgressStoreTestV2;
import com.palantir.atlasdb.sweep.progress.AbstractSweepProgressStoreTest;
import org.junit.jupiter.api.extension.RegisterExtension;

public class CassandraSweepProgressStoreIntegrationTest extends AbstractSweepProgressStoreTestV2 {
public class CassandraSweepProgressStoreIntegrationTest extends AbstractSweepProgressStoreTest {
@RegisterExtension
public static final CassandraResource CASSANDRA = new CassandraResource();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
import com.palantir.atlasdb.keyvalue.api.Cell;
import com.palantir.atlasdb.keyvalue.api.Value;
import com.palantir.atlasdb.protos.generated.TableMetadataPersistence;
import com.palantir.atlasdb.sweep.AbstractTargetedSweepTestV2;
import com.palantir.atlasdb.sweep.AbstractTargetedSweepTest;
import com.palantir.atlasdb.table.description.TableMetadata;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

public class CassandraTargetedSweepIntegrationTest extends AbstractTargetedSweepTestV2 {
public class CassandraTargetedSweepIntegrationTest extends AbstractTargetedSweepTest {
@RegisterExtension
public static final CassandraResource CASSANDRA = new CassandraResource();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
package com.palantir.cassandra.multinode;

import com.palantir.atlasdb.containers.ThreeNodeCassandraResource;
import com.palantir.atlasdb.keyvalue.impl.AbstractMultiCasTestV2;
import com.palantir.atlasdb.keyvalue.impl.AbstractMultiCasTest;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.extension.RegisterExtension;

@Order(1) // No node is down.
public class CassandraMultiNodeMultiCasTest extends AbstractMultiCasTestV2 {
public class CassandraMultiNodeMultiCasTest extends AbstractMultiCasTest {
@RegisterExtension
public static final ThreeNodeCassandraResource CASSANDRA = new ThreeNodeCassandraResource();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.palantir.atlasdb.keyvalue.cassandra.CassandraKeyValueService;
import com.palantir.atlasdb.keyvalue.cassandra.CassandraKeyValueServiceImpl;
import com.palantir.atlasdb.keyvalue.impl.KvsManager;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManagerV2;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManager;
import com.palantir.atlasdb.keyvalue.impl.TransactionManagerManager;
import com.palantir.atlasdb.transaction.api.TransactionManager;
import com.palantir.refreshable.Refreshable;
Expand All @@ -38,7 +38,7 @@ public class CassandraResource implements BeforeAllCallback, AfterAllCallback, K
private final CassandraContainer containerInstance = new CassandraContainer();
private final Supplier<KeyValueService> supplier;
private Containers containers;
private TestResourceManagerV2 testResourceManager;
private TestResourceManager testResourceManager;
private Proxy socksProxy;

public CassandraResource() {
Expand All @@ -52,7 +52,7 @@ public CassandraResource(Supplier<KeyValueService> supplier) {
@Override
public void beforeAll(ExtensionContext extensionContext) throws Exception {
containers = new Containers(extensionContext.getRequiredTestClass()).with(containerInstance);
testResourceManager = new TestResourceManagerV2(supplier);
testResourceManager = new TestResourceManager(supplier);
containers.beforeAll(extensionContext);
socksProxy = Containers.getSocksProxy(containerInstance.getServiceName());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.palantir.atlasdb.keyvalue.cassandra.CassandraKeyValueService;
import com.palantir.atlasdb.keyvalue.cassandra.CassandraKeyValueServiceImpl;
import com.palantir.atlasdb.keyvalue.impl.KvsManager;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManagerV2;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManager;
import com.palantir.atlasdb.keyvalue.impl.TransactionManagerManager;
import com.palantir.atlasdb.transaction.api.TransactionManager;
import java.io.IOException;
Expand All @@ -33,7 +33,7 @@
public class ThreeNodeCassandraResource
implements BeforeAllCallback, AfterAllCallback, KvsManager, TransactionManagerManager {
private final Supplier<KeyValueService> supplier;
private TestResourceManagerV2 testResourceManager;
private TestResourceManager testResourceManager;

public ThreeNodeCassandraResource() {
this.supplier = () -> CassandraKeyValueServiceImpl.createForTesting(
Expand All @@ -44,7 +44,7 @@ public ThreeNodeCassandraResource() {
public void beforeAll(ExtensionContext extensionContext) throws IOException, InterruptedException {
Containers containers =
new Containers(extensionContext.getRequiredTestClass()).with(new ThreeNodeCassandraCluster());
testResourceManager = new TestResourceManagerV2(supplier);
testResourceManager = new TestResourceManager(supplier);
containers.beforeAll(extensionContext);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.palantir.atlasdb.keyvalue.api.TableReference;
import com.palantir.atlasdb.keyvalue.dbkvs.impl.ConnectionManagerAwareDbKvs;
import com.palantir.atlasdb.keyvalue.dbkvs.impl.DbKvs;
import com.palantir.atlasdb.keyvalue.impl.AbstractKeyValueServiceTestV2;
import com.palantir.atlasdb.keyvalue.impl.AbstractKeyValueServiceTest;
import com.palantir.atlasdb.keyvalue.impl.KvsManager;
import com.palantir.common.base.ClosableIterator;
import java.util.HashSet;
Expand All @@ -40,7 +40,7 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;

public abstract class AbstractDbKvsKeyValueServiceTest extends AbstractKeyValueServiceTestV2 {
public abstract class AbstractDbKvsKeyValueServiceTest extends AbstractKeyValueServiceTest {
protected static final Namespace TEST_NAMESPACE = Namespace.create("ns");
protected static final String TEST_LONG_TABLE_NAME =
"ThisShouldAlwaysBeAVeryLongTableNameThatExceedsPostgresLengthLimit";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@

package com.palantir.atlasdb.keyvalue.dbkvs.impl.oracle;

import com.palantir.atlasdb.keyvalue.impl.AbstractGetCandidateCellsForSweepingTestV2;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManagerV2;
import com.palantir.atlasdb.keyvalue.impl.AbstractGetCandidateCellsForSweepingTest;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManager;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;

@ExtendWith(DbKvsOracleExtension.class)
public class DbKvsOracleGetCandidateCellsForSweepingTest extends AbstractGetCandidateCellsForSweepingTestV2 {
public class DbKvsOracleGetCandidateCellsForSweepingTest extends AbstractGetCandidateCellsForSweepingTest {

@RegisterExtension
public static final TestResourceManagerV2 TRM = new TestResourceManagerV2(DbKvsOracleExtension::createKvs);
public static final TestResourceManager TRM = new TestResourceManager(DbKvsOracleExtension::createKvs);

public DbKvsOracleGetCandidateCellsForSweepingTest() {
super(TRM);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import com.palantir.atlasdb.AtlasDbConstants;
import com.palantir.atlasdb.keyvalue.api.TableReference;
import com.palantir.atlasdb.keyvalue.dbkvs.AbstractDbKvsKeyValueServiceTest;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManagerV2;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManager;
import com.palantir.atlasdb.table.description.TableMetadata;
import com.palantir.atlasdb.table.description.ValueType;
import com.palantir.atlasdb.transaction.api.ConflictHandler;
Expand All @@ -39,7 +39,7 @@
public class DbKvsOracleKeyValueServiceTest extends AbstractDbKvsKeyValueServiceTest {

@RegisterExtension
public static final TestResourceManagerV2 TRM = new TestResourceManagerV2(DbKvsOracleExtension::createKvs);
public static final TestResourceManager TRM = new TestResourceManager(DbKvsOracleExtension::createKvs);

private static final TableReference TABLE_1 =
TableReference.createFromFullyQualifiedName("multipass.providerGroupIdAndRealmToPrincipalId");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@

package com.palantir.atlasdb.keyvalue.dbkvs.impl.oracle;

import com.palantir.atlasdb.keyvalue.impl.TestResourceManagerV2;
import com.palantir.atlasdb.transaction.impl.AbstractSerializableTransactionTestV2;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManager;
import com.palantir.atlasdb.transaction.impl.AbstractSerializableTransactionTest;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;

@ExtendWith(DbKvsOracleExtension.class)
public class DbKvsOracleSerializableTransactionTest extends AbstractSerializableTransactionTestV2 {
public class DbKvsOracleSerializableTransactionTest extends AbstractSerializableTransactionTest {

@RegisterExtension
public static final TestResourceManagerV2 TRM = new TestResourceManagerV2(DbKvsOracleExtension::createKvs);
public static final TestResourceManager TRM = new TestResourceManager(DbKvsOracleExtension::createKvs);

public DbKvsOracleSerializableTransactionTest() {
super(TRM, TRM);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@

package com.palantir.atlasdb.keyvalue.dbkvs.impl.oracle;

import com.palantir.atlasdb.keyvalue.impl.TestResourceManagerV2;
import com.palantir.atlasdb.sweep.AbstractSweepTaskRunnerTestV2;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManager;
import com.palantir.atlasdb.sweep.AbstractSweepTaskRunnerTest;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;

@ExtendWith(DbKvsOracleExtension.class)
public class DbKvsOracleSweepTaskRunnerTest extends AbstractSweepTaskRunnerTestV2 {
public class DbKvsOracleSweepTaskRunnerTest extends AbstractSweepTaskRunnerTest {

@RegisterExtension
public static final TestResourceManagerV2 TRM = new TestResourceManagerV2(DbKvsOracleExtension::createKvs);
public static final TestResourceManager TRM = new TestResourceManager(DbKvsOracleExtension::createKvs);

public DbKvsOracleSweepTaskRunnerTest() {
super(TRM, TRM);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@

package com.palantir.atlasdb.keyvalue.dbkvs.impl.oracle;

import com.palantir.atlasdb.keyvalue.impl.TestResourceManagerV2;
import com.palantir.atlasdb.sweep.AbstractTargetedSweepTestV2;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManager;
import com.palantir.atlasdb.sweep.AbstractTargetedSweepTest;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;

@ExtendWith(DbKvsOracleExtension.class)
public class DbKvsOracleTargetedSweepIntegrationTest extends AbstractTargetedSweepTestV2 {
public class DbKvsOracleTargetedSweepIntegrationTest extends AbstractTargetedSweepTest {

@RegisterExtension
public static final TestResourceManagerV2 TRM = new TestResourceManagerV2(DbKvsOracleExtension::createKvs);
public static final TestResourceManager TRM = new TestResourceManager(DbKvsOracleExtension::createKvs);

public DbKvsOracleTargetedSweepIntegrationTest() {
super(TRM, TRM);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import com.palantir.atlasdb.keyvalue.dbkvs.impl.ConnectionManagerAwareDbKvs;
import com.palantir.atlasdb.keyvalue.dbkvs.impl.ConnectionSupplier;
import com.palantir.atlasdb.keyvalue.dbkvs.impl.OverflowMigrationState;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManagerV2;
import com.palantir.atlasdb.keyvalue.impl.TestResourceManager;
import com.palantir.atlasdb.logging.KvsProfilingLogger.CallableCheckedException;
import com.palantir.atlasdb.table.description.TableMetadata;
import com.palantir.atlasdb.table.description.ValueType;
Expand All @@ -54,7 +54,7 @@
public final class OracleAlterTableIntegrationTest {

@RegisterExtension
public static final TestResourceManagerV2 TRM = new TestResourceManagerV2(DbKvsOracleExtension::createKvs);
public static final TestResourceManager TRM = new TestResourceManager(DbKvsOracleExtension::createKvs);

private static final Namespace NAMESPACE = Namespace.create("test_namespace");
private static final TableReference TABLE_REFERENCE = TableReference.create(NAMESPACE, "foo");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
import com.palantir.atlasdb.keyvalue.api.KeyValueService;
import com.palantir.atlasdb.keyvalue.dbkvs.impl.ConnectionManagerAwareDbKvs;
import com.palantir.atlasdb.keyvalue.dbkvs.timestamp.InDbTimestampBoundStore;
import com.palantir.atlasdb.timestamp.AbstractDbTimestampBoundStoreTestV2;
import com.palantir.atlasdb.timestamp.AbstractDbTimestampBoundStoreTest;
import com.palantir.timestamp.TimestampBoundStore;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.extension.ExtendWith;

@ExtendWith(DbKvsOracleExtension.class)
public class OracleEmbeddedDbTimestampBoundStoreTest extends AbstractDbTimestampBoundStoreTestV2 {
public class OracleEmbeddedDbTimestampBoundStoreTest extends AbstractDbTimestampBoundStoreTest {

private KeyValueService kvs;

Expand Down
Loading

0 comments on commit 05ba227

Please sign in to comment.