Skip to content

Commit

Permalink
Merge pull request #20 from project-tsurugi/fix-kvs-checkstyle-warnings
Browse files Browse the repository at this point in the history
fix checkstyle warnings
  • Loading branch information
t-horikawa authored Nov 13, 2023
2 parents 7f13da8 + a700981 commit 0261b68
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class BasicPutGetRemoveTest extends TestBase {
private static final String KEY_NAME = "k1";
private static final String VALUE_NAME = "v1";

public BasicPutGetRemoveTest() throws Exception {
BasicPutGetRemoveTest() throws Exception {
String schema = String.format("%s BIGINT PRIMARY KEY, %s BIGINT", KEY_NAME, VALUE_NAME);
createTable(TABLE_NAME, schema);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CommitTest extends TestBase {
private static final String KEY_NAME = "k1";
private static final String VALUE_NAME = "v1";

public CommitTest() throws Exception {
CommitTest() throws Exception {
String schema = String.format("%s BIGINT PRIMARY KEY, %s BIGINT", KEY_NAME, VALUE_NAME);
createTable(TABLE_NAME, schema);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class GetTest extends TestBase {
private static final String KEY_NAME = "k1";
private static final String VALUE_NAME = "v1";

public GetTest() throws Exception {
GetTest() throws Exception {
String schema = String.format("%s BIGINT PRIMARY KEY, %s BIGINT", KEY_NAME, VALUE_NAME);
createTable(TABLE_NAME, schema);
}
Expand All @@ -30,7 +30,7 @@ public void invalidRequests() throws Exception {
// COLUMN_TYPE_MISMATCH
try (var tx = kvs.beginTransaction().await()) {
key.clear();
key.add(KEY_NAME, (int)key1);
key.add(KEY_NAME, (int) key1);
KvsServiceException ex = assertThrows(KvsServiceException.class,
() -> kvs.get(tx, TABLE_NAME, key).await());
assertEquals(KvsServiceCode.COLUMN_TYPE_MISMATCH, ex.getDiagnosticCode());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class PutMultiValuesTest extends TestBase {
private static final String VALUE1_NAME = "v1";
private static final String VALUE2_NAME = "v2";

public PutMultiValuesTest() throws Exception {
PutMultiValuesTest() throws Exception {
String schema = String.format("%s BIGINT PRIMARY KEY, %s BIGINT, %s BIGINT", KEY_NAME, VALUE1_NAME,
VALUE2_NAME);
createTable(TABLE_NAME, schema);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PutTest extends TestBase {
private static final String KEY_NAME = "k1";
private static final String VALUE_NAME = "v1";

public PutTest() throws Exception {
PutTest() throws Exception {
String schema = String.format("%s BIGINT PRIMARY KEY, %s BIGINT", KEY_NAME, VALUE_NAME);
createTable(TABLE_NAME, schema);
}
Expand All @@ -32,7 +32,7 @@ public void invalidRequests() throws Exception {
// COLUMN_TYPE_MISMATCH
try (var tx = kvs.beginTransaction().await()) {
buffer.clear();
buffer.add(KEY_NAME, (int)key1);
buffer.add(KEY_NAME, (int) key1);
buffer.add(VALUE_NAME, value1);
KvsServiceException ex = assertThrows(KvsServiceException.class,
() -> kvs.put(tx, TABLE_NAME, buffer, PutType.OVERWRITE).await());
Expand All @@ -42,16 +42,16 @@ public void invalidRequests() throws Exception {
try (var tx = kvs.beginTransaction().await()) {
buffer.clear();
buffer.add(KEY_NAME, key1);
buffer.add(VALUE_NAME, (int)value1);
buffer.add(VALUE_NAME, (int) value1);
KvsServiceException ex = assertThrows(KvsServiceException.class,
() -> kvs.put(tx, TABLE_NAME, buffer, PutType.OVERWRITE).await());
assertEquals(KvsServiceCode.COLUMN_TYPE_MISMATCH, ex.getDiagnosticCode());
kvs.rollback(tx).await();
}
try (var tx = kvs.beginTransaction().await()) {
buffer.clear();
buffer.add(KEY_NAME, (int)key1);
buffer.add(VALUE_NAME, (int)value1);
buffer.add(KEY_NAME, (int) key1);
buffer.add(VALUE_NAME, (int) value1);
KvsServiceException ex = assertThrows(KvsServiceException.class,
() -> kvs.put(tx, TABLE_NAME, buffer, PutType.OVERWRITE).await());
assertEquals(KvsServiceCode.COLUMN_TYPE_MISMATCH, ex.getDiagnosticCode());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class RemoveTest extends TestBase {
private static final String KEY_NAME = "k1";
private static final String VALUE_NAME = "v1";

public RemoveTest() throws Exception {
RemoveTest() throws Exception {
String schema = String.format("%s BIGINT PRIMARY KEY, %s BIGINT", KEY_NAME, VALUE_NAME);
createTable(TABLE_NAME, schema);
}
Expand All @@ -30,7 +30,7 @@ public void invalidRequests() throws Exception {
// COLUMN_TYPE_MISMATCH
try (var tx = kvs.beginTransaction().await()) {
key.clear();
key.add(KEY_NAME, (int)key1);
key.add(KEY_NAME, (int) key1);
KvsServiceException ex = assertThrows(KvsServiceException.class,
() -> kvs.remove(tx, TABLE_NAME, key).await());
assertEquals(KvsServiceCode.COLUMN_TYPE_MISMATCH, ex.getDiagnosticCode());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class RollbackTest extends TestBase {
private static final String KEY_NAME = "k1";
private static final String VALUE_NAME = "v1";

public RollbackTest() throws Exception {
RollbackTest() throws Exception {
String schema = String.format("%s BIGINT PRIMARY KEY, %s BIGINT", KEY_NAME, VALUE_NAME);
createTable(TABLE_NAME, schema);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class SecondaryIndexTableTest extends TestBase {
private static final String KEY_NAME = "k1";
private static final String VALUE_NAME = "v1";

public SecondaryIndexTableTest() throws Exception {
SecondaryIndexTableTest() throws Exception {
String schema = String.format("%s BIGINT PRIMARY KEY, %s BIGINT", KEY_NAME, VALUE_NAME);
createTable(TABLE_NAME, schema);
String sql = String.format("CREATE INDEX %s on %s(%s)", "index" + VALUE_NAME, TABLE_NAME, VALUE_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SessionClientTest extends TestBase {
private static final String KEY_NAME = "k1";
private static final String VALUE_NAME = "v1";

public SessionClientTest() throws Exception {
SessionClientTest() throws Exception {
String schema = String.format("%s BIGINT PRIMARY KEY, %s BIGINT", KEY_NAME, VALUE_NAME);
createTable(TABLE_NAME, schema);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CompatMultiValuesTest extends CompatBase {

private static final String TABLE_NAME = "table" + CompatMultiValuesTest.class.getSimpleName();

public CompatMultiValuesTest() throws Exception {
CompatMultiValuesTest() throws Exception {
super(TABLE_NAME);
}

Expand Down

0 comments on commit 0261b68

Please sign in to comment.