diff --git a/nsqd/protocol_v2_test.go b/nsqd/protocol_v2_test.go index 5cacc4c75..80139fead 100644 --- a/nsqd/protocol_v2_test.go +++ b/nsqd/protocol_v2_test.go @@ -1400,7 +1400,7 @@ func benchmarkProtocolV2Pub(b *testing.B, size int) { opts.MemQueueSize = int64(b.N) tcpAddr, _, nsqd := mustStartNSQD(opts) msg := make([]byte, size) - batchSize := 200 + batchSize := int(opts.MaxBodySize) / size batch := make([][]byte, batchSize) for i := range batch { batch[i] = msg