Skip to content

Commit

Permalink
HBASE-26920 Fix missing braces warnings in TestProcedureMember (apach…
Browse files Browse the repository at this point in the history
…e#4315)

Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
(cherry picked from commit 78676bb)
  • Loading branch information
Apache9 committed Apr 3, 2022
1 parent a7f8e2a commit 1b768cd
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;

import org.apache.hbase.thirdparty.com.google.common.io.Closeables;

/**
* Test the procedure member, and it's error handling mechanisms.
*/
Expand Down Expand Up @@ -77,14 +79,9 @@ public class TestProcedureMember {
* Reset all the mock objects
*/
@After
public void resetTest() {
public void resetTest() throws IOException {
reset(mockListener, mockBuilder, mockMemberComms);
if (member != null)
try {
member.close();
} catch (IOException e) {
e.printStackTrace();
}
Closeables.close(member, true);
}

/**
Expand Down Expand Up @@ -273,7 +270,7 @@ public Void answer(InvocationOnMock invocation) throws Throwable {

/**
* Handle failures if a member's commit phase fails.
*
* <p/>
* NOTE: This is the core difference that makes this different from traditional 2PC. In true
* 2PC the transaction is committed just before the coordinator sends commit messages to the
* member. Members are then responsible for reading its TX log. This implementation actually
Expand Down Expand Up @@ -314,7 +311,7 @@ public Void answer(InvocationOnMock invocation) throws Throwable {

/**
* Handle Failures if a member's commit phase succeeds but notification to coordinator fails
*
* <p/>
* NOTE: This is the core difference that makes this different from traditional 2PC. In true
* 2PC the transaction is committed just before the coordinator sends commit messages to the
* member. Members are then responsible for reading its TX log. This implementation actually
Expand Down

0 comments on commit 1b768cd

Please sign in to comment.