-
Notifications
You must be signed in to change notification settings - Fork 39
Fix races in unit-tests #82
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
Conversation
|
@andig thanks for the hint, but currently we define multiple clients if used concurrently (though not over serial line) and are not planning to change this as of now. |
|
OT: multiple clients sharing the same underlying network connection to the same modbus server? |
|
@andig the code is here. You can define multiple requests in a plugin instance, those will be done sequentially. Additionally it is possible to have multiple of those plugins running concurrently and then they share nothing, i.e. each instance will open an own connection to the configured endpoint. We can chat on out slack if you are interested in more details to avoid cluttering this PR... ;-) |
|
@andig is there anything I should do in this commit to get this merged? |
|
I can‘t speak for @grid-x, sorry |
|
@hsteidl anything I can do to get this merged? |
hnicolaysen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! The test fix looks good to me. Thanks for sharing!
Running
go test -v -racewill report two races, one forTestSerialCloseIdleand one forTestTCPTransporter(see excerpt below). This PR fixes the races in both tests.and