Skip to content

Commit

Permalink
Bad mocking of Monitors in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Needham committed Aug 23, 2016
1 parent 0c4df5a commit 172fb75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -102,8 +102,9 @@ private synchronized void onTimeout()
try
{
transactionServer = connectionStrategy.coreMember();
pullRequestMonitor.txPullRequest( applier.lastAppliedTxId() );
TxPullRequest txPullRequest = new TxPullRequest( applier.lastAppliedTxId(), localDatabase.get() );
long lastAppliedTxId = applier.lastAppliedTxId();
pullRequestMonitor.txPullRequest( lastAppliedTxId );
TxPullRequest txPullRequest = new TxPullRequest( lastAppliedTxId, localDatabase.get() );
catchUpClient.makeBlockingRequest( transactionServer, txPullRequest, 30, TimeUnit.SECONDS,
new CatchUpResponseAdaptor<Long>() {
@Override
Expand Down
Expand Up @@ -63,7 +63,7 @@ public class TxPollingClientTest

private final TxPollingClient txPuller = new TxPollingClient( NullLogProvider.getInstance(), () -> storeId,
catchUpClient, serverSelection,
timeoutService, txPullTimeoutMillis, txApplier, mock(Monitors.class) );
timeoutService, txPullTimeoutMillis, txApplier, new Monitors() );

@Before
public void before() throws Throwable
Expand Down

0 comments on commit 172fb75

Please sign in to comment.