Skip to content

Commit

Permalink
fix testTxnCommitMarker
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason918 committed Aug 1, 2022
1 parent 4a06bba commit c32e4c1
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,13 @@
package org.apache.pulsar.common.protocol;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;

import io.netty.buffer.ByteBuf;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import lombok.extern.slf4j.Slf4j;
import org.apache.pulsar.common.api.proto.PulsarApi.MessageMetadata;
import org.apache.pulsar.common.api.proto.PulsarMarkers;
Expand Down Expand Up @@ -139,14 +134,6 @@ public void testTxnCommitMarker() throws IOException {
}

ByteBuf buf = Markers.newTxnCommitMarker(sequenceId, mostBits, leastBits, messageIdDataList);
for (MessageIdData messageIdData : messageIdDataList) {
try {
messageIdData.recycle();
fail("message id data should be recycled after create the marker bytebuf.");
} catch (Exception e) {
assertTrue(e instanceof java.lang.IllegalStateException);
}
}
MessageMetadata msgMetadata = Commands.parseMessageMetadata(buf);

assertEquals(msgMetadata.getMarkerType(), PulsarMarkers.MarkerType.TXN_COMMIT_VALUE);
Expand Down

0 comments on commit c32e4c1

Please sign in to comment.