@Test
public void testShouldUseProtocolVersionOverride() {
BoundCluster cluster = new BoundCluster(ClusterSpec.builder().build(), 0L, null);
BoundDataCenter dc = new BoundDataCenter(cluster);
BoundNode node =
new BoundNode(
new LocalAddress(UUID.randomUUID().toString()),
NodeSpec.builder()
.withName("node0")
.withId(0L)
.withCassandraVersion("2.1.17")
.withPeerInfo("protocol_versions", Lists.newArrayList(4))
.build(),
Collections.emptyMap(),
cluster,
dc,
null,
timer,
null, // channel reference only needed for closing, not useful in context of this test.
false);
assertThat(node.getFrameCodec().getSupportedProtocolVersions()).containsOnly(4);
}
ProtocolVersionSupportTest.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:simulacron
作者:
评论列表
文章目录