ARTEMIS-1847 Fix test after netty upgrade
Missing call to resetReadIndex causes IndexOutOfBoundsException after netty fixed to correctly throw on vilation of the contract.
This commit is contained in:
parent
2ea4d1c8bf
commit
8f4b1a6c18
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue