Skip to content

Commit 1c20822

Browse files
committed
Refactor BlobStorageConfigTest
1 parent ed60372 commit 1c20822

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

core/src/test/java/com/scalar/db/storage/objectstorage/BlobStorageConfigTest.java

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,13 @@ public void constructor_AllPropertiesGiven_ShouldLoadProperly() {
6060
}
6161

6262
@Test
63-
public void constructor_PropertiesWithoutOptimizationOptionsGiven_ShouldLoadProperly() {
63+
public void constructor_PropertiesWithoutNonMandatoryOptionsGiven_ShouldLoadProperly() {
6464
// Arrange
6565
Properties props = new Properties();
6666
props.setProperty(DatabaseConfig.CONTACT_POINTS, ANY_CONTACT_POINT);
6767
props.setProperty(DatabaseConfig.USERNAME, ANY_USERNAME);
6868
props.setProperty(DatabaseConfig.PASSWORD, ANY_PASSWORD);
6969
props.setProperty(DatabaseConfig.STORAGE, BLOB_STORAGE);
70-
props.setProperty(DatabaseConfig.SYSTEM_NAMESPACE_NAME, ANY_TABLE_METADATA_NAMESPACE);
7170

7271
// Act
7372
BlobStorageConfig config = new BlobStorageConfig(new DatabaseConfig(props));
@@ -77,7 +76,6 @@ public void constructor_PropertiesWithoutOptimizationOptionsGiven_ShouldLoadProp
7776
assertThat(config.getUsername()).isEqualTo(ANY_USERNAME);
7877
assertThat(config.getPassword()).isEqualTo(ANY_PASSWORD);
7978
assertThat(config.getBucket()).isEqualTo(ANY_BUCKET);
80-
assertThat(config.getMetadataNamespace()).isEqualTo(ANY_TABLE_METADATA_NAMESPACE);
8179
assertThat(config.getParallelUploadBlockSizeInBytes())
8280
.isEqualTo(BlobStorageConfig.DEFAULT_PARALLEL_UPLOAD_BLOCK_SIZE_IN_BYTES);
8381
assertThat(config.getParallelUploadMaxParallelism())
@@ -101,35 +99,6 @@ public void constructor_WithoutStorage_ShouldThrowIllegalArgumentException() {
10199
.isInstanceOf(IllegalArgumentException.class);
102100
}
103101

104-
@Test
105-
public void constructor_WithoutSystemNamespaceName_ShouldLoadProperly() {
106-
// Arrange
107-
Properties props = new Properties();
108-
props.setProperty(DatabaseConfig.CONTACT_POINTS, ANY_CONTACT_POINT);
109-
props.setProperty(DatabaseConfig.USERNAME, ANY_USERNAME);
110-
props.setProperty(DatabaseConfig.PASSWORD, ANY_PASSWORD);
111-
props.setProperty(DatabaseConfig.STORAGE, BLOB_STORAGE);
112-
113-
// Act
114-
BlobStorageConfig config = new BlobStorageConfig(new DatabaseConfig(props));
115-
116-
// Assert
117-
assertThat(config.getEndpoint()).isEqualTo(ANY_ENDPOINT);
118-
assertThat(config.getUsername()).isEqualTo(ANY_USERNAME);
119-
assertThat(config.getPassword()).isEqualTo(ANY_PASSWORD);
120-
assertThat(config.getBucket()).isEqualTo(ANY_BUCKET);
121-
assertThat(config.getMetadataNamespace())
122-
.isEqualTo(DatabaseConfig.DEFAULT_SYSTEM_NAMESPACE_NAME);
123-
assertThat(config.getParallelUploadBlockSizeInBytes())
124-
.isEqualTo(BlobStorageConfig.DEFAULT_PARALLEL_UPLOAD_BLOCK_SIZE_IN_BYTES);
125-
assertThat(config.getParallelUploadMaxParallelism())
126-
.isEqualTo(BlobStorageConfig.DEFAULT_PARALLEL_UPLOAD_MAX_PARALLELISM);
127-
assertThat(config.getParallelUploadThresholdInBytes())
128-
.isEqualTo(BlobStorageConfig.DEFAULT_PARALLEL_UPLOAD_THRESHOLD_IN_BYTES);
129-
assertThat(config.getRequestTimeoutInSeconds())
130-
.isEqualTo(BlobStorageConfig.DEFAULT_REQUEST_TIMEOUT_IN_SECONDS);
131-
}
132-
133102
@Test
134103
public void
135104
constructor_PropertiesWithEmptyContactPointsGiven_ShouldThrowIllegalArgumentException() {

0 commit comments

Comments
 (0)