Repository: activemq-artemis Updated Branches: refs/heads/master 2ea4d1c8b -> 8f4b1a6c1
ARTEMIS-1847 Fix test after netty upgrade Missing call to resetReadIndex causes IndexOutOfBoundsException after netty fixed to correctly throw on vilation of the contract. Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/8f4b1a6c Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/8f4b1a6c Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/8f4b1a6c Branch: refs/heads/master Commit: 8f4b1a6c1855553f3765c06b12b2592128dd4ab3 Parents: 2ea4d1c Author: Timothy Bish <[email protected]> Authored: Thu May 3 14:47:55 2018 -0400 Committer: Timothy Bish <[email protected]> Committed: Thu May 3 14:47:55 2018 -0400 ---------------------------------------------------------------------- .../org/apache/activemq/artemis/utils/TypedPropertiesTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8f4b1a6c/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/TypedPropertiesTest.java ---------------------------------------------------------------------- diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/TypedPropertiesTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/TypedPropertiesTest.java index 205fc3b..efc51c6 100644 --- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/TypedPropertiesTest.java +++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/TypedPropertiesTest.java @@ -20,8 +20,6 @@ import java.util.Iterator; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; -import io.netty.buffer.ByteBuf; -import io.netty.buffer.Unpooled; import org.apache.activemq.artemis.api.core.ActiveMQBuffer; import org.apache.activemq.artemis.api.core.ActiveMQBuffers; import org.apache.activemq.artemis.api.core.SimpleString; @@ -30,6 +28,9 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; + public class TypedPropertiesTest { private static void assertEqualsTypeProperties(final TypedProperties expected, final TypedProperties actual) { @@ -246,6 +247,7 @@ public class TypedPropertiesTest { final TypedProperties.StringValue expectedPooled = pool.getOrCreate(bb); bb.resetReaderIndex(); Assert.assertSame(expectedPooled, pool.getOrCreate(bb)); + bb.resetReaderIndex(); } }
