Skip to content

Commit

Permalink
test[protocol]: compatible test
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysunxiao committed Sep 26, 2023
1 parent ac7a4c4 commit 62f72a9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
package com.zfoo.protocol.compatible;

import com.zfoo.protocol.ProtocolManager;
import com.zfoo.protocol.buffer.ByteBufUtils;
import com.zfoo.protocol.generate.GenerateOperation;
import com.zfoo.protocol.packet.*;
import com.zfoo.protocol.util.*;
Expand All @@ -21,6 +22,8 @@
import org.junit.Ignore;
import org.junit.Test;

import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.util.Set;

Expand Down Expand Up @@ -92,6 +95,7 @@ public void enhanceNormalTest() {
public void normalTest() {
var buffer = new UnpooledHeapByteBuf(ByteBufAllocator.DEFAULT, 100, 1_0000);
ProtocolManager.write(buffer, normalObject);
// FileUtils.writeInputStreamToFile(new File("normal-no-compatible.bytes"), new ByteArrayInputStream(ByteBufUtils.readAllBytes(buffer)));
var packet = ProtocolManager.read(buffer);


Expand Down

0 comments on commit 62f72a9

Please sign in to comment.