address review

Signed-off-by: R.I.Pienaar <rip@devco.net>
This commit is contained in:
R.I.Pienaar
2020-10-30 15:06:22 +01:00
parent 0e9ca7614f
commit bf68068fa6
2 changed files with 3 additions and 4 deletions

View File

@@ -1076,8 +1076,8 @@ func nextReqFromMsg(msg []byte) (time.Time, int, bool, error) {
bs := 1
// Naked batch size here for backward compatibility.
switch {
case bytes.HasPrefix(msg, AckNext):
if n, _ := fmt.Sscanf(string(msg), ackNextCnt, &bs); n == 0 {
case strings.HasPrefix(req, string(AckNext)):
if n, _ := fmt.Sscanf(req, ackNextCnt, &bs); n == 0 {
bs = 1
}
default:

View File

@@ -83,7 +83,6 @@ func RunBasicJetStreamServer() *server.Server {
opts := DefaultTestOptions
opts.Port = -1
opts.JetStream = true
opts.NoLog = true
return RunServer(&opts)
}
@@ -3018,7 +3017,7 @@ func TestJetStreamConsumerAckAck(t *testing.T) {
testAck(server.AckTerm)
}
func TestJetStreamNack(t *testing.T) {
func TestJetStreamAckNext(t *testing.T) {
s := RunBasicJetStreamServer()
defer s.Shutdown()