Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autopaho tests and resolve issues identified by them. #156

Merged
merged 1 commit into from
Aug 8, 2023
Merged

Add autopaho tests and resolve issues identified by them. #156

merged 1 commit into from
Aug 8, 2023

Conversation

MattBrittan
Copy link
Contributor

As part of continuing work on session state persistence, this adds tests to autopaho that will provide a base for testing coming changes. An option to use a custom connection function was also introduced (mainly to simplify tests). The tests identified a few issues which have been resolved:

  • errChan (autopaho.NewConnection) may lead to leaked goroutine (due to the timing of calls to client.OnClientError)
  • The way autopaho set logging handlers led to a data race.

Closes #155

As part of continuing work on session state persistence, this adds tests to autopaho that will
provide a base for testing coming changes. An option to use a custom connection function was also introduced (mainly to simplify tests).
The tests identified a few issues which have been resolved:
* `errChan` (`autopaho.NewConnection`) may lead to leaked goroutine (due to the timing of calls to `client.OnClientError`)
* The way `autopaho` set logging handlers led to a data race.

Closes #155
@MattBrittan MattBrittan merged commit dcab07a into eclipse:master Aug 8, 2023
@MattBrittan MattBrittan deleted the autotest branch August 8, 2023 02:28
@MattBrittan MattBrittan mentioned this pull request Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On disconnect errchan is left unread, leaks a goroutine.
1 participant