Skip to content

Commit

Permalink
Fix spotless issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jmelchio committed Jun 25, 2020
1 parent 1801310 commit 2c25481
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
Expand Down Expand Up @@ -76,12 +76,14 @@ public void diskUsageCriticalPercentageMustBeBetweenZeroAndOneHundred() {
diskStore.setDiskUsageCriticalPercentage(-1F);
assertThatThrownBy(() -> diskStoreValidator.validate(CacheElementOperation.CREATE, diskStore))
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("Disk usage critical percentage must be set to a value between 0-100");
.hasMessageContaining(
"Disk usage critical percentage must be set to a value between 0-100");

diskStore.setDiskUsageCriticalPercentage(101F);
assertThatThrownBy(() -> diskStoreValidator.validate(CacheElementOperation.CREATE, diskStore))
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("Disk usage critical percentage must be set to a value between 0-100");
.hasMessageContaining(
"Disk usage critical percentage must be set to a value between 0-100");
}

@Test
Expand Down Expand Up @@ -124,7 +126,8 @@ public void maxOplogSizeInBytesMustBePositiveNumber() {
diskStore.setMaxOplogSizeInBytes(-1L);
assertThatThrownBy(() -> diskStoreValidator.validate(CacheElementOperation.CREATE, diskStore))
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("Maximum Oplog size specified has to be a non-negative number and the value given");
.hasMessageContaining(
"Maximum Oplog size specified has to be a non-negative number and the value given");
}

@Test
Expand All @@ -135,7 +138,8 @@ public void queueSizeMustBePositiveNumber() {
diskStore.setQueueSize(-1);
assertThatThrownBy(() -> diskStoreValidator.validate(CacheElementOperation.CREATE, diskStore))
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("Queue size specified has to be a non-negative number and the value given");
.hasMessageContaining(
"Queue size specified has to be a non-negative number and the value given");
}

@Test
Expand All @@ -146,7 +150,8 @@ public void writeBufferSizeMustBePositiveNumber() {
diskStore.setWriteBufferSize(-1);
assertThatThrownBy(() -> diskStoreValidator.validate(CacheElementOperation.CREATE, diskStore))
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("Write buffer size specified has to be a non-negative number and the value given");
.hasMessageContaining(
"Write buffer size specified has to be a non-negative number and the value given");
}

@Test
Expand All @@ -159,4 +164,4 @@ public void dirSizesMustBePositiveNumber() {
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("Dir size cannot be negative :");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ public void createDuplicateDiskStoreFails() {
.hasStatusCode(ClusterManagementResult.StatusCode.OK);

assertThatThrownBy(() -> client.create(diskStore))
.hasMessageContaining("ENTITY_EXISTS: DiskStore 'storeone' already exists in group cluster");
.hasMessageContaining(
"ENTITY_EXISTS: DiskStore 'storeone' already exists in group cluster");

assertManagementResult(client.delete(diskStore))
.hasStatusCode(ClusterManagementResult.StatusCode.OK);
Expand All @@ -127,7 +128,8 @@ public void createWithIllegalParamFails() {
diskStore.setDiskUsageCriticalPercentage(120.0F);

assertThatThrownBy(() -> client.create(diskStore))
.hasMessageContaining("ILLEGAL_ARGUMENT: Disk usage critical percentage must be set to a value between 0-100. The value 120.0 is invalid");
.hasMessageContaining(
"ILLEGAL_ARGUMENT: Disk usage critical percentage must be set to a value between 0-100. The value 120.0 is invalid");
}

@Test
Expand All @@ -139,7 +141,8 @@ public void diskStoresCanBeDeleted() {
assertManagementResult(client.create(diskStore))
.hasStatusCode(ClusterManagementResult.StatusCode.OK);

ClusterManagementGetResult<DiskStore, DiskStoreInfo> clusterManagementGetResult = client.get(diskStore);
ClusterManagementGetResult<DiskStore, DiskStoreInfo> clusterManagementGetResult =
client.get(diskStore);
assertThat(clusterManagementGetResult.isSuccessful());
assertThat(clusterManagementGetResult.getResult().getId()).isEqualTo("storeone");

Expand Down

0 comments on commit 2c25481

Please sign in to comment.