ARTEMIS-1056 Fixing AutomaticColocatedQuorumVoteTest

This commit is contained in:
Clebert Suconic 2017-03-23 09:35:17 -04:00 committed by Martyn Taylor
parent a03c61fc7b
commit 633b9c75dd
2 changed files with 6 additions and 2 deletions

View File

@ -17,6 +17,7 @@
package org.apache.activemq.artemis.core.protocol.core.impl.wireformat;
import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
import org.apache.activemq.artemis.core.server.cluster.qourum.QuorumVoteHandler;
@ -57,7 +58,8 @@ public class QuorumVoteMessage extends PacketImpl {
public void decodeRest(ActiveMQBuffer buffer) {
super.decodeRest(buffer);
handler = buffer.readSimpleString();
voteBuffer = buffer.readSlice(buffer.readableBytes());
voteBuffer = ActiveMQBuffers.fixedBuffer(buffer.readableBytes());
buffer.readBytes(voteBuffer);
}
public SimpleString getHandler() {

View File

@ -17,6 +17,7 @@
package org.apache.activemq.artemis.core.protocol.core.impl.wireformat;
import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
import org.apache.activemq.artemis.core.server.cluster.qourum.QuorumVoteHandler;
@ -62,7 +63,8 @@ public class QuorumVoteReplyMessage extends PacketImpl {
public void decodeRest(ActiveMQBuffer buffer) {
super.decodeRest(buffer);
handler = buffer.readSimpleString();
voteBuffer = buffer.readSlice(buffer.readableBytes());
voteBuffer = ActiveMQBuffers.fixedBuffer(buffer.readableBytes());
buffer.readBytes(voteBuffer);
}
public void decodeRest(QuorumVoteHandler voteHandler) {