Skip to content

Conversation

@aretap
Copy link

@aretap aretap commented Feb 16, 2023

GH-4014: Fix inconsistent usage of MQTT timeouts

Fixes #4014

Also fixes error log with text "... Never happens."

  • Introduce completionTimeout into a ClientManager abstraction
    and fix inappropriate usages of the connectionTimeout over there.

  • Deprecate the disconnectCompletionTimeout in favor of
    completionTimeout for consistency with other similar places.

  • Update MqttAdapterTests.testDifferentQos JUnit test.

  • TODO: There is still a problematic JUnit test ClientManagerBackToBackTests.testV3ClientManagerReconnect. It passes when executed alone, but fails when executed together with other tests. It seems to me that there is some race condition or improper Spring context initialization. I am not able to sort this out. The test used to pass before this fix, but that was "a pass by an accident" as it logged the problematic exception "... Never happens" and then passed.

aretap and others added 3 commits February 14, 2023 19:23
Fixes spring-projects#4014

Also fixes error log with text "... Never happens."

* Introduce `completionTimeout` into a `ClientManager` abstraction
and fix inappropriate usages of the `connectionTimeout` over there.

* Deprecate the `disconnectCompletionTimeout` in favor of
`completionTimeout` for consistency with other similar places.
Fixes spring-projects#4014

Update MqttAdapterTests.testDifferentQos JUnit test.
@aretap
Copy link
Author

aretap commented Feb 16, 2023

I see that I ran into a partial conflict with somebody else who was also solving this issue...

@artembilan artembilan added the status: duplicate There is already an issue similar to this. The link to it should be present label Feb 16, 2023
@artembilan
Copy link
Member

Sorry, this has been fixed via #8552.
And yes: I also noticed that test failure and fixed it in that PR as well.

Thank you for your effort any way!
There are still a lot of issues you can take for contribution though

@artembilan artembilan closed this Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: duplicate There is already an issue similar to this. The link to it should be present

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reusing of MQTT connection (clientId) results in error log "... Never happens."

2 participants