From ed5ce7251d0153add87ace1152e0afacb4e0af0b Mon Sep 17 00:00:00 2001 From: Matt Reiferson Date: Fri, 1 May 2015 09:53:31 -0700 Subject: [PATCH] nsqd: fix E_BAD_BODY for MPUB benchmarks --- nsqd/protocol_v2_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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