mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Properly handle and enforce max payload
This commit is contained in:
21
test/opts_test.go
Normal file
21
test/opts_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright 2015 Apcera Inc. All rights reserved.
|
||||
|
||||
package test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestServerConfig(t *testing.T) {
|
||||
srv, opts := RunServerWithConfig("./configs/override.conf")
|
||||
defer srv.Shutdown()
|
||||
|
||||
c := createClientConn(t, opts.Host, opts.Port)
|
||||
defer c.Close()
|
||||
|
||||
sinfo := checkInfoMsg(t, c)
|
||||
if sinfo.MaxPayload != opts.MaxPayload {
|
||||
t.Fatalf("Expected max_payload from server, got %d vs %d",
|
||||
opts.MaxPayload, sinfo.MaxPayload)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user