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

HBASE-26920 Fix missing braces warnings in TestProcedureMember #4315

Merged
merged 1 commit into from
Apr 3, 2022
Merged
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 @@ -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