use of org.apache.cassandra.net.TestChannel in project cassandra by apache.
the class StreamingInboundHandlerTest method setup.
@Before
public void setup() {
channel = new TestChannel();
streamingChannel = new NettyStreamingChannel(VERSION, channel, StreamingChannel.Kind.CONTROL);
channel.pipeline().addLast("stream", streamingChannel);
}
use of org.apache.cassandra.net.TestChannel in project cassandra by apache.
the class StreamingMultiplexedChannelTest method setUp.
@Before
public void setUp() {
channel = new TestChannel();
streamingChannel = new NettyStreamingChannel(current_version, channel, StreamingChannel.Kind.CONTROL);
UUID pendingRepair = UUID.randomUUID();
session = new StreamSession(StreamOperation.BOOTSTRAP, REMOTE_ADDR, new NettyStreamingConnectionFactory(), streamingChannel, current_version, true, 0, pendingRepair, PreviewKind.ALL);
StreamResultFuture future = StreamResultFuture.createFollower(0, UUID.randomUUID(), StreamOperation.REPAIR, REMOTE_ADDR, streamingChannel, current_version, pendingRepair, session.getPreviewKind());
session.init(future);
session.attachOutbound(streamingChannel);
sender = session.getChannel();
sender.setControlChannel(streamingChannel);
}
Aggregations