diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitAdminIntegrationTestWithCosmos.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitAdminIntegrationTestWithCosmos.java index 2bfb6bb5bc..95ab2e4960 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitAdminIntegrationTestWithCosmos.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitAdminIntegrationTestWithCosmos.java @@ -2,7 +2,6 @@ import com.scalar.db.transaction.consensuscommit.ConsensusCommitAdminIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class ConsensusCommitAdminIntegrationTestWithCosmos @@ -13,13 +12,6 @@ protected Properties getProps(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespaceBaseName() { - String namespaceBaseName = super.getNamespaceBaseName(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespaceBaseName).orElse(namespaceBaseName); - } - @Override protected Map getCreationOptions() { return CosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitAdminRepairTableIntegrationTestWithCosmos.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitAdminRepairTableIntegrationTestWithCosmos.java index 22dc8d7577..e538a364d8 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitAdminRepairTableIntegrationTestWithCosmos.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitAdminRepairTableIntegrationTestWithCosmos.java @@ -6,7 +6,6 @@ import com.scalar.db.transaction.consensuscommit.ConsensusCommitAdminRepairTableIntegrationTestBase; import com.scalar.db.util.AdminTestUtils; import java.util.Map; -import java.util.Optional; import java.util.Properties; import org.junit.jupiter.api.Test; @@ -18,16 +17,6 @@ protected Properties getProps(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespace() { - return getNamespace(super.getNamespace()); - } - - private String getNamespace(String namespace) { - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return CosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitCosmosEnv.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitCosmosEnv.java index 8f094876e7..17aa015dc1 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitCosmosEnv.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitCosmosEnv.java @@ -2,7 +2,6 @@ import com.scalar.db.common.ConsensusCommitTestUtils; import java.util.Map; -import java.util.Optional; import java.util.Properties; public final class ConsensusCommitCosmosEnv { @@ -13,10 +12,6 @@ public static Properties getProperties(String testName) { return ConsensusCommitTestUtils.loadConsensusCommitProperties(properties); } - public static Optional getDatabasePrefix() { - return CosmosEnv.getDatabasePrefix(); - } - public static Map getCreationOptions() { return CosmosEnv.getCreationOptions(); } diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitCrossPartitionScanIntegrationTestWithCosmos.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitCrossPartitionScanIntegrationTestWithCosmos.java index d4205f3999..b69b0e751d 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitCrossPartitionScanIntegrationTestWithCosmos.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitCrossPartitionScanIntegrationTestWithCosmos.java @@ -3,7 +3,6 @@ import com.scalar.db.transaction.consensuscommit.ConsensusCommitConfig; import com.scalar.db.transaction.consensuscommit.ConsensusCommitCrossPartitionScanIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -18,13 +17,6 @@ protected Properties getProps(String testName) { return properties; } - @Override - protected String getNamespaceBaseName() { - String namespaceBaseName = super.getNamespaceBaseName(); - Optional databasePrefix = ConsensusCommitCosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespaceBaseName).orElse(namespaceBaseName); - } - @Override protected Map getCreationOptions() { return ConsensusCommitCosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitIntegrationTestWithCosmos.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitIntegrationTestWithCosmos.java index 6d871a767f..9ef8c3f839 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitIntegrationTestWithCosmos.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitIntegrationTestWithCosmos.java @@ -2,7 +2,6 @@ import com.scalar.db.transaction.consensuscommit.ConsensusCommitIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class ConsensusCommitIntegrationTestWithCosmos extends ConsensusCommitIntegrationTestBase { @@ -12,13 +11,6 @@ protected Properties getProps(String testName) { return ConsensusCommitCosmosEnv.getProperties(testName); } - @Override - protected String getNamespaceBaseName() { - String namespaceBaseName = super.getNamespaceBaseName(); - Optional databasePrefix = ConsensusCommitCosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespaceBaseName).orElse(namespaceBaseName); - } - @Override protected Map getCreationOptions() { return ConsensusCommitCosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitNullMetadataIntegrationTestWithCosmos.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitNullMetadataIntegrationTestWithCosmos.java index ac1f22ef07..913190ad3b 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitNullMetadataIntegrationTestWithCosmos.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitNullMetadataIntegrationTestWithCosmos.java @@ -2,7 +2,6 @@ import com.scalar.db.transaction.consensuscommit.ConsensusCommitNullMetadataIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class ConsensusCommitNullMetadataIntegrationTestWithCosmos @@ -13,21 +12,6 @@ protected Properties getProperties(String testName) { return ConsensusCommitCosmosEnv.getProperties(testName); } - @Override - protected String getNamespace1() { - return getNamespace(super.getNamespace1()); - } - - @Override - protected String getNamespace2() { - return getNamespace(super.getNamespace2()); - } - - private String getNamespace(String namespace) { - Optional databasePrefix = ConsensusCommitCosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return ConsensusCommitCosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitSpecificIntegrationTestWithCosmos.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitSpecificIntegrationTestWithCosmos.java index 3da69741c1..52fa7fc6a3 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitSpecificIntegrationTestWithCosmos.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitSpecificIntegrationTestWithCosmos.java @@ -2,7 +2,6 @@ import com.scalar.db.transaction.consensuscommit.ConsensusCommitSpecificIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class ConsensusCommitSpecificIntegrationTestWithCosmos @@ -13,21 +12,6 @@ protected Properties getProperties(String testName) { return ConsensusCommitCosmosEnv.getProperties(testName); } - @Override - protected String getNamespace1() { - return getNamespace(super.getNamespace1()); - } - - @Override - protected String getNamespace2() { - return getNamespace(super.getNamespace2()); - } - - private String getNamespace(String namespace) { - Optional databasePrefix = ConsensusCommitCosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return ConsensusCommitCosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitWithIncludeMetadataEnabledIntegrationTestWithCosmos.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitWithIncludeMetadataEnabledIntegrationTestWithCosmos.java index 383f2196fb..e6fc9e7c75 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitWithIncludeMetadataEnabledIntegrationTestWithCosmos.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/ConsensusCommitWithIncludeMetadataEnabledIntegrationTestWithCosmos.java @@ -2,7 +2,6 @@ import com.scalar.db.transaction.consensuscommit.ConsensusCommitWithIncludeMetadataEnabledIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class ConsensusCommitWithIncludeMetadataEnabledIntegrationTestWithCosmos @@ -13,13 +12,6 @@ protected Properties getProperties(String testName) { return ConsensusCommitCosmosEnv.getProperties(testName); } - @Override - protected String getNamespace() { - String namespace = super.getNamespace(); - Optional databasePrefix = ConsensusCommitCosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return ConsensusCommitCosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosAdminIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosAdminIntegrationTest.java index 644c1fe065..7b46ebb40d 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosAdminIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosAdminIntegrationTest.java @@ -2,7 +2,6 @@ import com.scalar.db.api.DistributedStorageAdminIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class CosmosAdminIntegrationTest extends DistributedStorageAdminIntegrationTestBase { @@ -12,26 +11,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespace1() { - return getNamespace(super.getNamespace1()); - } - - @Override - protected String getNamespace2() { - return getNamespace(super.getNamespace2()); - } - - @Override - protected String getNamespace3() { - return getNamespace(super.getNamespace3()); - } - - private String getNamespace(String namespace) { - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return CosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosAdminRepairTableIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosAdminRepairTableIntegrationTest.java index 5c18f243b3..5458b3afd8 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosAdminRepairTableIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosAdminRepairTableIntegrationTest.java @@ -6,7 +6,6 @@ import com.scalar.db.exception.storage.ExecutionException; import com.scalar.db.util.AdminTestUtils; import java.util.Map; -import java.util.Optional; import java.util.Properties; import org.junit.jupiter.api.Test; @@ -18,16 +17,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespace() { - return getNamespace(super.getNamespace()); - } - - private String getNamespace(String namespace) { - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return CosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosColumnValueIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosColumnValueIntegrationTest.java index f7513204da..5aa6648f9e 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosColumnValueIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosColumnValueIntegrationTest.java @@ -2,7 +2,6 @@ import com.scalar.db.api.DistributedStorageColumnValueIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class CosmosColumnValueIntegrationTest @@ -12,13 +11,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespace() { - String namespace = super.getNamespace(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return CosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosConditionalMutationIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosConditionalMutationIntegrationTest.java index 5d6208de89..0d9fc650ad 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosConditionalMutationIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosConditionalMutationIntegrationTest.java @@ -5,7 +5,6 @@ import com.scalar.db.io.DataType; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.Properties; import java.util.stream.Collectors; @@ -16,13 +15,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespace() { - String namespace = super.getNamespace(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected int getThreadNum() { return 3; diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosCrossPartitionScanIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosCrossPartitionScanIntegrationTest.java index 767cfc399d..cb0f895e8a 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosCrossPartitionScanIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosCrossPartitionScanIntegrationTest.java @@ -2,7 +2,6 @@ import com.scalar.db.api.DistributedStorageCrossPartitionScanIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -15,13 +14,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespaceBaseName() { - String namespaceBaseName = super.getNamespaceBaseName(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespaceBaseName).orElse(namespaceBaseName); - } - @Override protected Map getCreationOptions() { return CosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosEnv.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosEnv.java index 60fac2b410..d16b8d486e 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosEnv.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosEnv.java @@ -2,16 +2,12 @@ import com.google.common.collect.ImmutableMap; import com.scalar.db.config.DatabaseConfig; -import com.scalar.db.transaction.consensuscommit.ConsensusCommitConfig; -import com.scalar.db.transaction.consensuscommit.Coordinator; import java.util.Map; -import java.util.Optional; import java.util.Properties; public final class CosmosEnv { private static final String PROP_COSMOS_URI = "scalardb.cosmos.uri"; private static final String PROP_COSMOS_PASSWORD = "scalardb.cosmos.password"; - private static final String PROP_COSMOS_DATABASE_PREFIX = "scalardb.cosmos.database_prefix"; private static final String PROP_COSMOS_CREATE_OPTIONS = "scalardb.cosmos.create_options"; private static final ImmutableMap DEFAULT_COSMOS_CREATE_OPTIONS = @@ -22,7 +18,6 @@ private CosmosEnv() {} public static Properties getProperties(String testName) { String contactPoint = System.getProperty(PROP_COSMOS_URI); String password = System.getProperty(PROP_COSMOS_PASSWORD); - Optional databasePrefix = getDatabasePrefix(); Properties props = new Properties(); props.setProperty(DatabaseConfig.CONTACT_POINTS, contactPoint); @@ -32,28 +27,13 @@ public static Properties getProperties(String testName) { props.setProperty(DatabaseConfig.CROSS_PARTITION_SCAN_FILTERING, "true"); props.setProperty(DatabaseConfig.CROSS_PARTITION_SCAN_ORDERING, "false"); - if (databasePrefix.isPresent()) { - // Add the prefix and testName as a metadata database suffix - props.setProperty( - CosmosConfig.TABLE_METADATA_DATABASE, - databasePrefix.get() + CosmosAdmin.METADATA_DATABASE + "_" + testName); - - props.setProperty( - ConsensusCommitConfig.COORDINATOR_NAMESPACE, - databasePrefix.get() + Coordinator.NAMESPACE); - } else { - // Add testName as a metadata database suffix - props.setProperty( - CosmosConfig.TABLE_METADATA_DATABASE, CosmosAdmin.METADATA_DATABASE + "_" + testName); - } + // Add testName as a metadata database suffix + props.setProperty( + CosmosConfig.TABLE_METADATA_DATABASE, CosmosAdmin.METADATA_DATABASE + "_" + testName); return props; } - public static Optional getDatabasePrefix() { - return Optional.ofNullable(System.getProperty(PROP_COSMOS_DATABASE_PREFIX)); - } - public static Map getCreationOptions() { String createOptionsString = System.getProperty(PROP_COSMOS_CREATE_OPTIONS); if (createOptionsString == null) { diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosIntegrationTest.java index 2fa4f46afc..797ecad64d 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosIntegrationTest.java @@ -2,7 +2,6 @@ import com.scalar.db.api.DistributedStorageIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class CosmosIntegrationTest extends DistributedStorageIntegrationTestBase { @@ -12,13 +11,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespace() { - String namespace = super.getNamespace(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return CosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosJapaneseIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosJapaneseIntegrationTest.java index 9c6001f10d..99975855a1 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosJapaneseIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosJapaneseIntegrationTest.java @@ -2,7 +2,6 @@ import com.scalar.db.api.DistributedStorageJapaneseIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class CosmosJapaneseIntegrationTest extends DistributedStorageJapaneseIntegrationTestBase { @@ -12,13 +11,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespace() { - String namespace = super.getNamespace(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return CosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosMultipleClusteringKeyScanIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosMultipleClusteringKeyScanIntegrationTest.java index 080653ee4a..ad97f1a7c3 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosMultipleClusteringKeyScanIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosMultipleClusteringKeyScanIntegrationTest.java @@ -5,7 +5,6 @@ import com.scalar.db.api.DistributedStorageMultipleClusteringKeyScanIntegrationTestBase; import com.scalar.db.io.DataType; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class CosmosMultipleClusteringKeyScanIntegrationTest @@ -16,13 +15,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespaceBaseName() { - String namespaceBaseName = super.getNamespaceBaseName(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespaceBaseName).orElse(namespaceBaseName); - } - @Override protected ListMultimap getClusteringKeyTypes() { // Return types without BLOB because blob is not supported for clustering key for now diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosMultiplePartitionKeyIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosMultiplePartitionKeyIntegrationTest.java index 0d7e4309b7..bc6a1b6ad6 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosMultiplePartitionKeyIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosMultiplePartitionKeyIntegrationTest.java @@ -2,7 +2,6 @@ import com.scalar.db.api.DistributedStorageMultiplePartitionKeyIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class CosmosMultiplePartitionKeyIntegrationTest @@ -12,13 +11,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespaceBaseName() { - String namespaceBaseName = super.getNamespaceBaseName(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespaceBaseName).orElse(namespaceBaseName); - } - @Override protected int getThreadNum() { return 3; diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSchemaLoaderIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSchemaLoaderIntegrationTest.java index 490795e609..78d2998252 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSchemaLoaderIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSchemaLoaderIntegrationTest.java @@ -2,7 +2,6 @@ import com.scalar.db.schemaloader.SchemaLoaderIntegrationTestBase; import com.scalar.db.util.AdminTestUtils; -import java.util.Optional; import java.util.Properties; public class CosmosSchemaLoaderIntegrationTest extends SchemaLoaderIntegrationTestBase { @@ -12,21 +11,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespace1() { - return getNamespace(super.getNamespace1()); - } - - @Override - protected String getNamespace2() { - return getNamespace(super.getNamespace2()); - } - - private String getNamespace(String namespace) { - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected AdminTestUtils getAdminTestUtils(String testName) { return new CosmosAdminTestUtils(getProperties(testName)); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSecondaryIndexIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSecondaryIndexIntegrationTest.java index 4fa96b9b00..e021b487ca 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSecondaryIndexIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSecondaryIndexIntegrationTest.java @@ -2,7 +2,6 @@ import com.scalar.db.api.DistributedStorageSecondaryIndexIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class CosmosSecondaryIndexIntegrationTest @@ -12,13 +11,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespace() { - String namespace = super.getNamespace(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return CosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSingleClusteringKeyScanIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSingleClusteringKeyScanIntegrationTest.java index 5fee773aff..c3e77f4c1a 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSingleClusteringKeyScanIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSingleClusteringKeyScanIntegrationTest.java @@ -4,7 +4,6 @@ import com.scalar.db.io.DataType; import java.util.HashSet; import java.util.Map; -import java.util.Optional; import java.util.Properties; import java.util.Set; @@ -15,13 +14,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespace() { - String namespace = super.getNamespace(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Set getClusteringKeyTypes() { // Return types without BLOB because blob is not supported for clustering key for now diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSinglePartitionKeyIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSinglePartitionKeyIntegrationTest.java index e959fa7f28..82c81e1c23 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSinglePartitionKeyIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosSinglePartitionKeyIntegrationTest.java @@ -2,7 +2,6 @@ import com.scalar.db.api.DistributedStorageSinglePartitionKeyIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class CosmosSinglePartitionKeyIntegrationTest @@ -12,13 +11,6 @@ protected Properties getProperties(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespace() { - String namespace = super.getNamespace(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return CosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosWithReservedKeywordIntegrationTest.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosWithReservedKeywordIntegrationTest.java index 0a368f5c75..cbae4c4982 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosWithReservedKeywordIntegrationTest.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/CosmosWithReservedKeywordIntegrationTest.java @@ -2,7 +2,6 @@ import com.scalar.db.api.DistributedStorageWithReservedKeywordIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class CosmosWithReservedKeywordIntegrationTest @@ -15,9 +14,7 @@ protected Properties getProperties(String testName) { @Override protected String getNamespace() { - String namespace = "reserved_keyword_test"; - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); + return "reserved_keyword_test"; } @Override diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/SingleCrudOperationTransactionAdminIntegrationTestWithCosmos.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/SingleCrudOperationTransactionAdminIntegrationTestWithCosmos.java index f08010fec6..e9b37a9ea4 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/SingleCrudOperationTransactionAdminIntegrationTestWithCosmos.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/SingleCrudOperationTransactionAdminIntegrationTestWithCosmos.java @@ -2,7 +2,6 @@ import com.scalar.db.transaction.singlecrudoperation.SingleCrudOperationTransactionAdminIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class SingleCrudOperationTransactionAdminIntegrationTestWithCosmos @@ -13,13 +12,6 @@ protected Properties getProps(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespaceBaseName() { - String namespaceBaseName = super.getNamespaceBaseName(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespaceBaseName).orElse(namespaceBaseName); - } - @Override protected Map getCreationOptions() { return CosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/SingleCrudOperationTransactionIntegrationTestWithCosmos.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/SingleCrudOperationTransactionIntegrationTestWithCosmos.java index 372c054660..85ac7dcc3a 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/SingleCrudOperationTransactionIntegrationTestWithCosmos.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/SingleCrudOperationTransactionIntegrationTestWithCosmos.java @@ -2,7 +2,6 @@ import com.scalar.db.transaction.singlecrudoperation.SingleCrudOperationTransactionIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class SingleCrudOperationTransactionIntegrationTestWithCosmos @@ -13,13 +12,6 @@ protected Properties getProps(String testName) { return CosmosEnv.getProperties(testName); } - @Override - protected String getNamespaceBaseName() { - String namespaceBaseName = super.getNamespaceBaseName(); - Optional databasePrefix = CosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespaceBaseName).orElse(namespaceBaseName); - } - @Override protected Map getCreationOptions() { return CosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/TwoPhaseConsensusCommitIntegrationTestWithCosmos.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/TwoPhaseConsensusCommitIntegrationTestWithCosmos.java index a7c57e8e29..4e5a6aa625 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/TwoPhaseConsensusCommitIntegrationTestWithCosmos.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/TwoPhaseConsensusCommitIntegrationTestWithCosmos.java @@ -2,7 +2,6 @@ import com.scalar.db.transaction.consensuscommit.TwoPhaseConsensusCommitIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class TwoPhaseConsensusCommitIntegrationTestWithCosmos @@ -13,13 +12,6 @@ protected Properties getProps1(String testName) { return ConsensusCommitCosmosEnv.getProperties(testName); } - @Override - protected String getNamespaceBaseName() { - String namespaceBaseName = super.getNamespaceBaseName(); - Optional databasePrefix = ConsensusCommitCosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespaceBaseName).orElse(namespaceBaseName); - } - @Override protected Map getCreationOptions() { return ConsensusCommitCosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/TwoPhaseConsensusCommitSpecificIntegrationTestWithCosmos.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/TwoPhaseConsensusCommitSpecificIntegrationTestWithCosmos.java index a2a6c929f1..d5b9e7c170 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/TwoPhaseConsensusCommitSpecificIntegrationTestWithCosmos.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/TwoPhaseConsensusCommitSpecificIntegrationTestWithCosmos.java @@ -2,7 +2,6 @@ import com.scalar.db.transaction.consensuscommit.TwoPhaseConsensusCommitSpecificIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class TwoPhaseConsensusCommitSpecificIntegrationTestWithCosmos @@ -13,21 +12,6 @@ protected Properties getProperties1(String testName) { return ConsensusCommitCosmosEnv.getProperties(testName); } - @Override - protected String getNamespace1() { - return getNamespace(super.getNamespace1()); - } - - @Override - protected String getNamespace2() { - return getNamespace(super.getNamespace2()); - } - - private String getNamespace(String namespace) { - Optional databasePrefix = ConsensusCommitCosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return ConsensusCommitCosmosEnv.getCreationOptions(); diff --git a/core/src/integration-test/java/com/scalar/db/storage/cosmos/TwoPhaseConsensusCommitWithIncludeMetadataEnabledIntegrationTestWithCosmos.java b/core/src/integration-test/java/com/scalar/db/storage/cosmos/TwoPhaseConsensusCommitWithIncludeMetadataEnabledIntegrationTestWithCosmos.java index 4b56cb010f..5620092a96 100644 --- a/core/src/integration-test/java/com/scalar/db/storage/cosmos/TwoPhaseConsensusCommitWithIncludeMetadataEnabledIntegrationTestWithCosmos.java +++ b/core/src/integration-test/java/com/scalar/db/storage/cosmos/TwoPhaseConsensusCommitWithIncludeMetadataEnabledIntegrationTestWithCosmos.java @@ -2,7 +2,6 @@ import com.scalar.db.transaction.consensuscommit.TwoPhaseConsensusCommitWithIncludeMetadataEnabledIntegrationTestBase; import java.util.Map; -import java.util.Optional; import java.util.Properties; public class TwoPhaseConsensusCommitWithIncludeMetadataEnabledIntegrationTestWithCosmos @@ -13,13 +12,6 @@ protected Properties getProperties(String testName) { return ConsensusCommitCosmosEnv.getProperties(testName); } - @Override - protected String getNamespace() { - String namespace = super.getNamespace(); - Optional databasePrefix = ConsensusCommitCosmosEnv.getDatabasePrefix(); - return databasePrefix.map(prefix -> prefix + namespace).orElse(namespace); - } - @Override protected Map getCreationOptions() { return ConsensusCommitCosmosEnv.getCreationOptions();