The tests suing LocalBullteinBoardClient instead of the Cached one.

Voter-Registry
Vladimir Eliezer Tokarev 2016-04-01 04:12:21 -07:00
parent 25781f40f7
commit 14d6759803
1 changed files with 2 additions and 13 deletions

View File

@ -1,7 +1,6 @@
import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.FutureCallback;
import meerkat.AsyncRegistry; import meerkat.AsyncRegistry;
import meerkat.bulletinboard.BulletinBoardServer; import meerkat.bulletinboard.BulletinBoardServer;
import meerkat.bulletinboard.CachedBulletinBoardClient;
import meerkat.bulletinboard.LocalBulletinBoardClient; import meerkat.bulletinboard.LocalBulletinBoardClient;
import meerkat.bulletinboard.sqlserver.BulletinBoardSQLServer; import meerkat.bulletinboard.sqlserver.BulletinBoardSQLServer;
import meerkat.bulletinboard.sqlserver.H2QueryProvider; import meerkat.bulletinboard.sqlserver.H2QueryProvider;
@ -14,7 +13,6 @@ import meerkat.protobuf.VoterRegistry;
import meerkat.protobuf.VoterRegistry.GroupID; import meerkat.protobuf.VoterRegistry.GroupID;
import meerkat.protobuf.VoterRegistry.VoterID; import meerkat.protobuf.VoterRegistry.VoterID;
import meerkat.protobuf.VoterRegistry.VoterInfo; import meerkat.protobuf.VoterRegistry.VoterInfo;
import meerkat.protobuf.Voting;
import meerkat.registry.MessageCollectionUtils; import meerkat.registry.MessageCollectionUtils;
import meerkat.registry.RegistryTags; import meerkat.registry.RegistryTags;
import org.junit.Before; import org.junit.Before;
@ -51,7 +49,7 @@ import static meerkat.util.BulletinBoardUtils.getLatestMessage;
public class SimpleRegistryTest { public class SimpleRegistryTest {
private DigitalSignature signer; private DigitalSignature signer;
private CachedBulletinBoardClient cachedBulletinBoardClient; private LocalBulletinBoardClient cachedBulletinBoardClient;
private SecureRandom random = new SecureRandom(); private SecureRandom random = new SecureRandom();
Semaphore jobSemaphore; Semaphore jobSemaphore;
@ -134,16 +132,7 @@ public class SimpleRegistryTest {
* @throws SQLException * @throws SQLException
*/ */
private void CommunicatorSetup() throws InstantiationException, IllegalAccessException, CommunicationException, SQLException { private void CommunicatorSetup() throws InstantiationException, IllegalAccessException, CommunicationException, SQLException {
LocalBulletinBoardClient localClient = CreateLocalBulletinBoardClient(); cachedBulletinBoardClient = CreateLocalBulletinBoardClient();
cachedBulletinBoardClient = new CachedBulletinBoardClient(localClient,
THREAD_NUM,
FAIL_DELAY,
SUBSCRIPTION_DELAY);
cachedBulletinBoardClient.init(Voting.BulletinBoardClientParams.newBuilder()
.setBulletinBoardAddress(0, LOCALHOST)
.setMinRedundancy(1)
.build());
} }
/** /**