Skip to content

Commit

Permalink
PR Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ndimiduk committed Mar 16, 2022
1 parent 297bc30 commit c2a8978
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public void onError(Throwable error) {

@Test
public void traceSyncTableEndpointCall() throws Exception {
final Connection connection = connectionRule.getSyncConnection();
final Connection connection = connectionRule.getConnection();
try (final Table table = connection.getTable(TEST_TABLE)) {
final RpcController controller = new ServerRpcController();
final EchoRequestProto request = EchoRequestProto.newBuilder().setMessage("hello").build();
Expand Down Expand Up @@ -280,7 +280,7 @@ public void traceSyncTableEndpointCall() throws Exception {

@Test
public void traceSyncTableEndpointCallAndCallback() throws Exception {
final Connection connection = connectionRule.getSyncConnection();
final Connection connection = connectionRule.getConnection();
try (final Table table = connection.getTable(TEST_TABLE)) {
final RpcController controller = new ServerRpcController();
final EchoRequestProto request = EchoRequestProto.newBuilder().setMessage("hello").build();
Expand Down Expand Up @@ -336,7 +336,7 @@ public void traceSyncTableEndpointCallAndCallback() throws Exception {

@Test
public void traceSyncTableRegionCoprocessorRpcChannel() throws Exception {
final Connection connection = connectionRule.getSyncConnection();
final Connection connection = connectionRule.getConnection();
try (final Table table = connection.getTable(TEST_TABLE)) {
final EchoRequestProto request = EchoRequestProto.newBuilder().setMessage("hello").build();
final EchoResponseProto response = TraceUtil.trace(() -> {
Expand Down Expand Up @@ -376,7 +376,7 @@ public void traceSyncTableRegionCoprocessorRpcChannel() throws Exception {

@Test
public void traceSyncTableBatchEndpoint() throws Exception {
final Connection connection = connectionRule.getSyncConnection();
final Connection connection = connectionRule.getConnection();
try (final Table table = connection.getTable(TEST_TABLE)) {
final Descriptors.MethodDescriptor descriptor =
TestProtobufRpcProto.getDescriptor().findMethodByName("echo");
Expand Down Expand Up @@ -423,7 +423,7 @@ public void traceSyncTableBatchEndpoint() throws Exception {

@Test
public void traceSyncTableBatchEndpointCallback() throws Exception {
final Connection connection = connectionRule.getSyncConnection();
final Connection connection = connectionRule.getConnection();
try (final Table table = connection.getTable(TEST_TABLE)) {
final Descriptors.MethodDescriptor descriptor =
TestProtobufRpcProto.getDescriptor().findMethodByName("echo");
Expand Down Expand Up @@ -504,7 +504,7 @@ public void traceAsyncAdminEndpoint() throws Exception {

@Test
public void traceSyncAdminEndpoint() throws Exception {
final Connection connection = connectionRule.getSyncConnection();
final Connection connection = connectionRule.getConnection();
try (final Admin admin = connection.getAdmin()) {
final TestProtobufRpcProto.BlockingInterface service =
TestProtobufRpcProto.newBlockingStub(admin.coprocessorService());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public final class ConnectionRule extends ExternalResource {
private Connection connection;
private AsyncConnection asyncConnection;

public static ConnectionRule createSyncConnectionRule(
public static ConnectionRule createConnectionRule(
final Supplier<Connection> connectionSupplier
) {
return new ConnectionRule(connectionSupplier, null);
Expand All @@ -80,7 +80,7 @@ private ConnectionRule(
this.asyncConnectionSupplier = asyncConnectionSupplier;
}

public Connection getSyncConnection() {
public Connection getConnection() {
if (connection == null) {
throw new IllegalStateException(
"ConnectionRule not initialized with a synchronous connection.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ public HBaseTestingUtil getTestingUtility() {
}

/**
* Create a {@link AsyncConnection} to the managed {@link SingleProcessHBaseCluster}. It's up to
* Create a {@link Connection} to the managed {@link SingleProcessHBaseCluster}. It's up to
* the caller to {@link Connection#close() close()} the connection when finished.
*/
public Connection createSyncConnection() {
public Connection createConnection() {
try {
return createAsyncConnection().get().toConnection();
} catch (InterruptedException | ExecutionException e) {
Expand Down

0 comments on commit c2a8978

Please sign in to comment.