X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2FMessageParserTest.java;h=8f9d89f1f10fb86fb37cf03fe9c83a536a2a5a82;hb=4063669aa69554b0513aac11c7a4e20fa066fa06;hp=0138cf2bcb09271c32edc96796f03327d342889a;hpb=7a467341d4938150323752d972b52dbf700aa6aa;p=controller.git diff --git a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/MessageParserTest.java b/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/MessageParserTest.java index 0138cf2bcb..8f9d89f1f1 100644 --- a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/MessageParserTest.java +++ b/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/MessageParserTest.java @@ -24,8 +24,8 @@ import org.junit.Test; import org.opendaylight.controller.netconf.api.NetconfMessage; import org.opendaylight.controller.netconf.util.handler.ChunkedFramingMechanismEncoder; import org.opendaylight.controller.netconf.util.handler.FramingMechanismHandlerFactory; -import org.opendaylight.controller.netconf.util.handler.NetconfMessageAggregator; -import org.opendaylight.controller.netconf.util.handler.NetconfMessageChunkDecoder; +import org.opendaylight.controller.netconf.util.handler.NetconfChunkAggregator; +import org.opendaylight.controller.netconf.util.handler.NetconfEOMAggregator; import org.opendaylight.controller.netconf.util.handler.NetconfMessageToXMLEncoder; import org.opendaylight.controller.netconf.util.handler.NetconfXMLToMessageDecoder; import org.opendaylight.controller.netconf.util.messages.FramingMechanism; @@ -48,7 +48,7 @@ public class MessageParserTest { FramingMechanismHandlerFactory.createHandler(FramingMechanism.CHUNK), new NetconfMessageToXMLEncoder(), - new NetconfMessageAggregator(FramingMechanism.CHUNK), new NetconfMessageChunkDecoder(), + new NetconfChunkAggregator(), new NetconfXMLToMessageDecoder()); testChunkChannel.writeOutbound(this.msg); @@ -94,15 +94,14 @@ public class MessageParserTest { public void testEOMFramingMechanismOnPipeline() throws Exception { EmbeddedChannel testChunkChannel = new EmbeddedChannel( FramingMechanismHandlerFactory.createHandler(FramingMechanism.EOM), - new NetconfMessageToXMLEncoder(), new NetconfMessageAggregator( - FramingMechanism.EOM), new NetconfXMLToMessageDecoder()); + new NetconfMessageToXMLEncoder(), new NetconfEOMAggregator(), new NetconfXMLToMessageDecoder()); testChunkChannel.writeOutbound(this.msg); ByteBuf recievedOutbound = (ByteBuf) testChunkChannel.readOutbound(); - byte[] eom = new byte[NetconfMessageConstants.endOfMessage.length]; - recievedOutbound.getBytes(recievedOutbound.readableBytes() - NetconfMessageConstants.endOfMessage.length, eom); - assertArrayEquals(NetconfMessageConstants.endOfMessage, eom); + byte[] eom = new byte[NetconfMessageConstants.END_OF_MESSAGE.length]; + recievedOutbound.getBytes(recievedOutbound.readableBytes() - NetconfMessageConstants.END_OF_MESSAGE.length, eom); + assertArrayEquals(NetconfMessageConstants.END_OF_MESSAGE, eom); testChunkChannel.writeInbound(recievedOutbound); NetconfMessage receivedMessage = (NetconfMessage) testChunkChannel.readInbound();