controlclient tests: fix more memory leaks and add resource checking.
I can now run these tests with -count=1000 without running out of RAM. Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
This commit is contained in:
@ -1148,7 +1148,11 @@ func (s *server) newClientWithKey(t *testing.T, name, authKey string) *client {
|
||||
},
|
||||
Hostinfo: hi,
|
||||
NewDecompressor: func() (Decompressor, error) {
|
||||
return zstd.NewReader(nil)
|
||||
return zstd.NewReader(nil,
|
||||
zstd.WithDecoderLowmem(true),
|
||||
zstd.WithDecoderConcurrency(1),
|
||||
zstd.WithDecoderMaxMemory(65536),
|
||||
)
|
||||
},
|
||||
KeepAlive: true,
|
||||
AuthKey: authKey,
|
||||
|
Reference in New Issue
Block a user