Search in sources :

Example 1 with TestChannel

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);
}
Also used : TestChannel(org.apache.cassandra.net.TestChannel) Before(org.junit.Before)

Example 2 with TestChannel

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);
}
Also used : StreamResultFuture(org.apache.cassandra.streaming.StreamResultFuture) StreamSession(org.apache.cassandra.streaming.StreamSession) UUID(java.util.UUID) TestChannel(org.apache.cassandra.net.TestChannel) Before(org.junit.Before)

Aggregations

TestChannel (org.apache.cassandra.net.TestChannel)2 Before (org.junit.Before)2 UUID (java.util.UUID)1 StreamResultFuture (org.apache.cassandra.streaming.StreamResultFuture)1 StreamSession (org.apache.cassandra.streaming.StreamSession)1