fix(rcmgr): improve error phrasing

limits were not exceeded, manager protects us from that
https://github.com/ipfs/kubo/issues/9432#issuecomment-1334160936
This commit is contained in:
Marcin Rataj 2022-12-01 22:15:20 +01:00 committed by Antonio Navarro Perez
parent c8a4b6ae00
commit 09765951ea
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ func (n *loggingResourceManager) start(ctx context.Context) {
n.limitExceededErrs = make(map[string]int)
for e, count := range errs {
n.logger.Errorf("Resource limits were exceeded %d times with error %q.", count, e)
n.logger.Errorf("Protected from exceeding resource limits %d times: %q.", count, e)
}
if len(errs) != 0 {

View File

@ -55,7 +55,7 @@ func TestLoggingResourceManager(t *testing.T) {
if oLogs.Len() == 0 {
continue
}
require.Equal(t, "Resource limits were exceeded 2 times with error \"system: cannot reserve inbound connection: resource limit exceeded\".", oLogs.All()[0].Message)
require.Equal(t, "Protected from exceeding resource limits 2 times: \"system: cannot reserve inbound connection: resource limit exceeded\".", oLogs.All()[0].Message)
return
}
}