Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.scalar.db.storage.cassandra;

import com.scalar.db.transaction.consensuscommit.ConsensusCommitIntegrationTestUtils;
import com.scalar.db.transaction.consensuscommit.ConsensusCommitTestUtils;
import java.util.Properties;

Expand All @@ -11,7 +10,7 @@ public static Properties getProperties(String testName) {
Properties properties = CassandraEnv.getProperties(testName);

// Add testName as a coordinator schema suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return ConsensusCommitTestUtils.loadConsensusCommitProperties(properties);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.scalar.db.storage.cosmos;

import com.scalar.db.transaction.consensuscommit.ConsensusCommitIntegrationTestUtils;
import com.scalar.db.transaction.consensuscommit.ConsensusCommitTestUtils;
import java.util.Map;
import java.util.Properties;
Expand All @@ -12,7 +11,7 @@ public static Properties getProperties(String testName) {
Properties properties = CosmosEnv.getProperties(testName);

// Add testName as a coordinator schema suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return ConsensusCommitTestUtils.loadConsensusCommitProperties(properties);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.scalar.db.storage.dynamo;

import com.scalar.db.transaction.consensuscommit.ConsensusCommitIntegrationTestUtils;
import com.scalar.db.transaction.consensuscommit.ConsensusCommitTestUtils;
import java.util.Map;
import java.util.Properties;
Expand All @@ -12,7 +11,7 @@ public static Properties getProperties(String testName) {
Properties properties = DynamoEnv.getProperties(testName);

// Add testName as a coordinator schema suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return ConsensusCommitTestUtils.loadConsensusCommitProperties(properties);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.scalar.db.storage.jdbc;

import com.scalar.db.transaction.consensuscommit.ConsensusCommitIntegrationTestUtils;
import com.scalar.db.transaction.consensuscommit.ConsensusCommitTestUtils;
import java.util.Properties;

Expand All @@ -11,7 +10,7 @@ public static Properties getProperties(String testName) {
Properties properties = JdbcEnv.getProperties(testName);

// Add testName as a coordinator schema suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return ConsensusCommitTestUtils.loadConsensusCommitProperties(properties);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.google.common.util.concurrent.Uninterruptibles;
import com.scalar.db.config.DatabaseConfig;
import com.scalar.db.schemaloader.SchemaLoaderIntegrationTestBase;
import com.scalar.db.transaction.consensuscommit.ConsensusCommitIntegrationTestUtils;
import com.scalar.db.transaction.consensuscommit.ConsensusCommitTestUtils;
import com.scalar.db.transaction.consensuscommit.Coordinator;
import com.scalar.db.util.AdminTestUtils;
import java.nio.file.Path;
Expand Down Expand Up @@ -59,20 +59,18 @@ protected Properties getProperties(String testName) {
DatabaseConfig.DEFAULT_SYSTEM_NAMESPACE_NAME + "_" + testName);

// Add testName as a coordinator schema suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return properties;
}

@Override
protected AdminTestUtils getAdminTestUtils(String testName) {
Properties propertiesForCassandra = MultiStorageEnv.getPropertiesForCassandra(testName);
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(
propertiesForCassandra, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(propertiesForCassandra, testName);

Properties propertiesForJdbc = MultiStorageEnv.getPropertiesForJdbc(testName);
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(
propertiesForJdbc, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(propertiesForJdbc, testName);

return new MultiStorageAdminTestUtils(propertiesForCassandra, propertiesForJdbc);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ protected final Properties getProperties(String testName) {
properties.putAll(getProps(testName));

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return properties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected final Properties getProperties(String testName) {
properties.putAll(getProps(testName));

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return properties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ protected final Properties getProperties(String testName) {
properties.putAll(getProps(testName));

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return properties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected final Properties getProperties(String testName) {
properties.putAll(getProps(testName));

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return properties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected final Properties getProperties(String testName) {
properties.putAll(getProps(testName));

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return properties;
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void beforeAll() throws Exception {
Properties properties = getProperties(TEST_NAME);

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, TEST_NAME);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, TEST_NAME);

StorageFactory factory = StorageFactory.create(properties);
admin = factory.getStorageAdmin();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void beforeAll() throws Exception {
Properties properties = getProperties(TEST_NAME);

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, TEST_NAME);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, TEST_NAME);

StorageFactory factory = StorageFactory.create(properties);
admin = factory.getStorageAdmin();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,11 @@ public static Properties loadConsensusCommitProperties(Properties properties) {
COORDINATOR_GROUP_COMMIT_METRICS_MONITOR_LOG_ENABLED);
return properties;
}

public static void addSuffixToCoordinatorNamespace(Properties properties, String suffix) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this method from ConsensusCommitIntegrationTestUtils to ConsensusCommitTestUtils.

String coordinatorNamespace =
properties.getProperty(ConsensusCommitConfig.COORDINATOR_NAMESPACE, Coordinator.NAMESPACE);
properties.setProperty(
ConsensusCommitConfig.COORDINATOR_NAMESPACE, coordinatorNamespace + "_" + suffix);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void beforeAll() throws Exception {
Properties properties = getProperties(TEST_NAME);

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, TEST_NAME);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, TEST_NAME);

// Enable to include metadata
properties.setProperty(ConsensusCommitConfig.INCLUDE_METADATA_ENABLED, "true");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected final Properties getProperties1(String testName) {
properties.putAll(getProps1(testName));

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return properties;
}
Expand All @@ -39,7 +39,7 @@ protected final Properties getProperties2(String testName) {
properties.putAll(getProps2(testName));

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return properties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected final Properties getProperties1(String testName) {
properties.putAll(getProps1(testName));

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return properties;
}
Expand All @@ -28,7 +28,7 @@ protected final Properties getProperties2(String testName) {
properties.putAll(getProps2(testName));

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, testName);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, testName);

return properties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ public void beforeAll() throws Exception {
initialize();
Properties properties1 = getProperties1(TEST_NAME);
// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties1, TEST_NAME);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties1, TEST_NAME);

Properties properties2 = getProperties2(TEST_NAME);
// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties2, TEST_NAME);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties2, TEST_NAME);

namespace1 = getNamespace1();
namespace2 = getNamespace2();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void beforeAll() throws Exception {
Properties properties = getProperties(TEST_NAME);

// Add testName as a coordinator namespace suffix
ConsensusCommitIntegrationTestUtils.addSuffixToCoordinatorNamespace(properties, TEST_NAME);
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, TEST_NAME);

// Enable to include metadata
properties.setProperty(ConsensusCommitConfig.INCLUDE_METADATA_ENABLED, "true");
Expand Down