This is an automated email from the ASF dual-hosted git repository.

eshu11 pushed a commit to branch feature/GEODE-5624
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/GEODE-5624 by this 
push:
     new e74c940  wip.
e74c940 is described below

commit e74c940c428e2455dc0b93006e57428f3a12c924
Author: eshu <[email protected]>
AuthorDate: Mon Aug 27 13:59:21 2018 -0700

    wip.
---
 .../src/main/java/org/apache/geode/internal/cache/TXState.java       | 4 ++--
 .../src/test/java/org/apache/geode/internal/cache/TXStateTest.java   | 5 -----
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java 
b/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java
index d0063a6..9be7f39 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java
@@ -1042,11 +1042,11 @@ public class TXState implements TXStateInterface {
         getExecutor(), getCancelCriterion());
   }
 
-  Executor getExecutor() {
+  private Executor getExecutor() {
     return getCache().getDistributionManager().getWaitingThreadPool();
   }
 
-  CancelCriterion getCancelCriterion() {
+  private CancelCriterion getCancelCriterion() {
     return getCache().getCancelCriterion();
   }
 
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/TXStateTest.java 
b/geode-core/src/test/java/org/apache/geode/internal/cache/TXStateTest.java
index c1e9acf..21fadf0 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/TXStateTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/TXStateTest.java
@@ -27,8 +27,6 @@ import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-import java.util.concurrent.Executor;
-
 import javax.transaction.Status;
 
 import org.junit.Before;
@@ -56,7 +54,6 @@ public class TXStateTest {
   @Test
   public void doBeforeCompletionThrowsIfReserveAndCheckFails() {
     TXState txState = spy(new TXState(txStateProxy, true));
-    doReturn(mock(Executor.class)).when(txState).getExecutor();
     doThrow(exception).when(txState).reserveAndCheck();
 
     assertThatThrownBy(() -> txState.doBeforeCompletion())
@@ -66,7 +63,6 @@ public class TXStateTest {
   @Test
   public void doAfterCompletionThrowsIfCommitFails() {
     TXState txState = spy(new TXState(txStateProxy, true));
-    doReturn(mock(InternalCache.class)).when(txState).getCache();
     doReturn(true).when(txState).wasBeforeCompletionCalled();
     txState.reserveAndCheck();
     doThrow(transactionDataNodeHasDepartedException).when(txState).commit();
@@ -78,7 +74,6 @@ public class TXStateTest {
   @Test
   public void doAfterCompletionCanCommitJTA() {
     TXState txState = spy(new TXState(txStateProxy, false));
-    doReturn(mock(InternalCache.class)).when(txState).getCache();
     txState.reserveAndCheck();
     txState.closed = true;
     doReturn(true).when(txState).wasBeforeCompletionCalled();

Reply via email to