Suggestion to improve tracing in nats-server through wrapping errors

Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
Matthias Hanel
2020-02-24 15:43:40 -05:00
parent 62bacf1044
commit d1d34d2638
7 changed files with 143 additions and 5 deletions

View File

@@ -15,6 +15,7 @@ package server
import (
"bytes"
"errors"
"testing"
)
@@ -582,7 +583,7 @@ func TestMaxControlLine(t *testing.T) {
pub := []byte("PUB foo.bar 11\r")
err := c.parse(pub)
if err != ErrMaxControlLine {
if !errors.Is(err, ErrMaxControlLine) {
t.Fatalf("Expected an error parsing longer than expected control line")
}
}