コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldNotRenewTheTimeoutIfInPanicState()
        public virtual void ShouldNotRenewTheTimeoutIfInPanicState()
        {
            // given
            _txPuller.start();
            CatchUpResponseCallback callback = mock(typeof(CatchUpResponseCallback));

            doThrow(new Exception("Panic all the things")).when(callback).onTxPullResponse(any(typeof(CompletableFuture)), any(typeof(TxPullResponse)));
            Timer timer = Mockito.spy(single(_timerService.getTimers(TX_PULLER_TIMER)));

            // when
            _timerService.invoke(TX_PULLER_TIMER);

            // then
            assertEquals(PANIC, _txPuller.state());
            verify(timer, never()).reset();
        }
コード例 #2
0
 internal virtual void SetResponseHandler <T1>(CatchUpResponseCallback responseHandler, CompletableFuture <T1> requestOutcomeSignal)
 {
     Handler.setResponseHandler(responseHandler, requestOutcomeSignal);
 }
コード例 #3
0
 internal virtual void SetResponseHandler <T1>(CatchUpResponseCallback responseHandler, CompletableFuture <T1> requestOutcomeSignal)
 {
     this.@delegate             = responseHandler;
     this._requestOutcomeSignal = requestOutcomeSignal;
 }
コード例 #4
0
 internal TrackingResponseHandler(CatchUpResponseCallback @delegate, Clock clock)
 {
     this.@delegate = @delegate;
     this._clock    = clock;
 }