Skip to content

Commit 78676bb

Browse files
authored
HBASE-26920 Fix missing braces warnings in TestProcedureMember (#4315)
Signed-off-by: Xiaolin Ha <[email protected]>
1 parent 4e12eee commit 78676bb

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedureMember.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
import org.mockito.invocation.InvocationOnMock;
4949
import org.mockito.stubbing.Answer;
5050

51+
import org.apache.hbase.thirdparty.com.google.common.io.Closeables;
52+
5153
/**
5254
* Test the procedure member, and it's error handling mechanisms.
5355
*/
@@ -77,14 +79,9 @@ public class TestProcedureMember {
7779
* Reset all the mock objects
7880
*/
7981
@After
80-
public void resetTest() {
82+
public void resetTest() throws IOException {
8183
reset(mockListener, mockBuilder, mockMemberComms);
82-
if (member != null)
83-
try {
84-
member.close();
85-
} catch (IOException e) {
86-
e.printStackTrace();
87-
}
84+
Closeables.close(member, true);
8885
}
8986

9087
/**
@@ -273,7 +270,7 @@ public Void answer(InvocationOnMock invocation) throws Throwable {
273270

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

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

0 commit comments

Comments
 (0)