use of org.apache.ignite.raft.jraft.option.RaftOptions in project ignite-3 by apache.
the class CopySessionTest method setup.
@BeforeEach
public void setup() {
this.timerManager = new TimerManager(5);
this.copyOpts = new CopyOptions();
this.raftOpts = new RaftOptions();
this.rb = raftOpts.getRaftMessagesFactory().getFileRequest().readerId(99).filename("data");
this.nodeOptions = new NodeOptions();
this.nodeOptions.setCommonExecutor(Executors.newSingleThreadExecutor());
this.session = new CopySession(rpcService, timerManager, null, raftOpts, this.nodeOptions, rb, address);
this.session.setCopyOptions(copyOpts);
}
use of org.apache.ignite.raft.jraft.option.RaftOptions in project ignite-3 by apache.
the class RemoteFileCopierTest method testInitFail.
@Test
public void testInitFail() {
Mockito.when(rpcService.connect(new Endpoint("localhost", 8081))).thenReturn(false);
assertFalse(copier.init("remote://localhost:8081/999", null, new SnapshotCopierOptions(rpcService, timerManager, new RaftOptions(), new NodeOptions())));
}
use of org.apache.ignite.raft.jraft.option.RaftOptions in project ignite-3 by apache.
the class BaseNodeRequestProcessorTest method setup.
@BeforeEach
public void setup() {
Mockito.lenient().when(node.getRaftOptions()).thenReturn(new RaftOptions());
this.asyncContext = new MockAsyncContext();
}
Aggregations