use of org.activityinfo.ui.client.dispatch.remote.cache.CachingDispatcher in project activityinfo by bedatadriven.
the class RemoteDispatcherTest method setUp.
@Before
public void setUp() {
service = createMock("remoteService", RemoteCommandServiceAsync.class);
proxy = createMock("proxy", CommandCache.class);
AuthenticatedUser auth = new AuthenticatedUser(AUTH_TOKEN, 1, "alex@alex.com");
BackOff backOff = new ExponentialBackOff.Builder().setInitialIntervalMillis(MergingDispatcher.ADVISORY_GET_LOCK_TIMEOUT).setMultiplier(// increase in 2 times
2).setNanoClock(new NanoClock() {
@Override
public long nanoTime() {
return System.nanoTime();
}
}).build();
dispatcher = new CachingDispatcher(proxyManager, new MergingDispatcher(new RemoteDispatcher(auth, service, "en"), scheduler, backOff));
}
Aggregations