cubefs/metanode/packet_test.go
daimaishusheng f4c3f8aa40 perf(metanode): align and reuse the Packet struct to reduce allocated memory
Signed-off-by: daimaishusheng <tangjiankun1226@gmail.com>
2025-03-21 14:59:11 +08:00

13 lines
177 B
Go

package metanode
import "testing"
func TestClearPacket(t *testing.T) {
p := &Packet{}
p.Opcode = 3
ClearPacket(p)
if 0 != p.Opcode {
t.Fatalf("ClearPacket failed")
}
}