Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix checkstyle warnings #20

Merged
merged 1 commit into from
Nov 13, 2023
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
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