X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=netconf%2Fnetconf-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fimpl%2FMessageParserTest.java;h=06b76a213dff55ba3753d508e834d1d01f7c2be5;hb=14adff2aa1c1a88371693ee9ecd0ce27b227f24e;hp=88f4f1133726a3e8877fab7ccc3be161a5048b81;hpb=b48e597dad44046da6af9ada1b22df0b51aa3a9a;p=netconf.git diff --git a/netconf/netconf-impl/src/test/java/org/opendaylight/netconf/impl/MessageParserTest.java b/netconf/netconf-impl/src/test/java/org/opendaylight/netconf/impl/MessageParserTest.java index 88f4f11337..06b76a213d 100644 --- a/netconf/netconf-impl/src/test/java/org/opendaylight/netconf/impl/MessageParserTest.java +++ b/netconf/netconf-impl/src/test/java/org/opendaylight/netconf/impl/MessageParserTest.java @@ -5,15 +5,12 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.netconf.impl; import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; @@ -35,7 +32,6 @@ import org.opendaylight.netconf.util.messages.FramingMechanism; import org.opendaylight.netconf.util.test.XmlFileLoader; public class MessageParserTest { - private NetconfMessage msg; @Before @@ -48,13 +44,12 @@ public class MessageParserTest { EmbeddedChannel testChunkChannel = new EmbeddedChannel( FramingMechanismHandlerFactory.createHandler(FramingMechanism.CHUNK), new NetconfMessageToXMLEncoder(), - - new NetconfChunkAggregator(), + new NetconfChunkAggregator(ChunkedFramingMechanismEncoder.MAX_CHUNK_SIZE), new NetconfXMLToMessageDecoder()); testChunkChannel.writeOutbound(msg); Queue messages = testChunkChannel.outboundMessages(); - assertFalse(messages.isEmpty()); + assertEquals(1, messages.size()); final NetconfMessageToXMLEncoder enc = new NetconfMessageToXMLEncoder(); final ByteBuf out = Unpooled.buffer(); @@ -83,7 +78,7 @@ public class MessageParserTest { testChunkChannel.writeInbound(recievedOutbound); } - assertTrue(messages.isEmpty()); + assertEquals(0, messages.size()); NetconfMessage receivedMessage = testChunkChannel.readInbound(); assertNotNull(receivedMessage);