Skip to content

The max_subs reload unit test is incorrect #4173

Description

@ColinSullivan1

Defect (Minor - incorrect test)

The server actually does support changing max_subs in a reload and will boot any connections in violation.

The unit test should be fixed. The test is actually failing on the change of port (set to -1 - randomly generated), not the change in max_subs as was assumed. Other tests may have this issues as well.

Here's server output of a reload reducing the max connections in an account. A connection now in violation is closed.

[48467] 2023/05/16 15:31:10.539316 [DBG] Trapped "hangup" signal
[48467] 2023/05/16 15:31:10.539536 [INF] Reloaded: authorization users
[48467] 2023/05/16 15:31:10.539543 [INF] Reloaded: accounts
[48467] 2023/05/16 15:31:10.539582 [INF] Reloaded server configuration
[48467] 2023/05/16 15:31:10.539601 [ERR] 127.0.0.1:60414 - cid:6 - maximum subscriptions exceeded
[48467] 2023/05/16 15:31:10.539795 [DBG] 127.0.0.1:60414 - cid:6 - Client connection closed: Client Closed

I can try to get to fixing this when I have time, but am certainly OK with the case someone beats me to it.

Versions of nats-server and affected client libraries used:

nats-server: v2.9.17-beta.5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectSuspected defect such as a bug or regression

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions