HBASE-26920 Fix missing braces warnings in TestProcedureMember (#4315)

Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
(cherry picked from commit 78676bb85e)
This commit is contained in:
Duo Zhang 2022-04-03 22:53:50 +08:00
parent 8650de2c3c
commit 787cc87794
1 changed files with 6 additions and 9 deletions

View File

@ -48,6 +48,8 @@ import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock; import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer; 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. * Test the procedure member, and it's error handling mechanisms.
*/ */
@ -77,14 +79,9 @@ public class TestProcedureMember {
* Reset all the mock objects * Reset all the mock objects
*/ */
@After @After
public void resetTest() { public void resetTest() throws IOException {
reset(mockListener, mockBuilder, mockMemberComms); reset(mockListener, mockBuilder, mockMemberComms);
if (member != null) Closeables.close(member, true);
try {
member.close();
} catch (IOException e) {
e.printStackTrace();
}
} }
/** /**
@ -273,7 +270,7 @@ public class TestProcedureMember {
/** /**
* Handle failures if a member's commit phase fails. * 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 * 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 * 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 * member. Members are then responsible for reading its TX log. This implementation actually
@ -314,7 +311,7 @@ public class TestProcedureMember {
/** /**
* Handle Failures if a member's commit phase succeeds but notification to coordinator fails * 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 * 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 * 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 * member. Members are then responsible for reading its TX log. This implementation actually