Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldSendNextBatchAfterMatch() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldSendNextBatchAfterMatch()
        {
            // given
            _raftLog.append(_entry0);
            _raftLog.append(_entry1);
            _raftLog.append(_entry2);
            _raftLog.append(_entry3);
            StartLogShipper();

            _logShipper.onMismatch(0, new LeaderContext(0, 0));

            // when
            _outbound.clear();
            _logShipper.onMatch(0, new LeaderContext(0, 0));

            // then
            assertThat(_outbound.sentTo(_follower), Matchers.hasRaftLogEntries(asList(_entry1, _entry2, _entry3)));
        }