-
Notifications
You must be signed in to change notification settings - Fork 85
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
#44 mllp client: read full response from the server #49
base: main
Are you sure you want to change the base?
Conversation
Thanks for the contribution -- the client was mainly written to provide simple testing via the
|
* mllp_client code updated to react on timeouts from socket, use of argparse instead of obsolete optparse * tests updated to follow new features and convetions
In most cases I use
It's application-level deadline for the ack receiving operation. I had to split this from socket-level timeout because of the way the client is used inside my code. But yes, you're right it would wait
Yep, tests from I've updated tests to follow changes in client code and added a test for end-of-message bytes check.
If you use I've added a condition to set appropriate logging levels depending on |
I think we might be experiencing this issue as well. Any chance to get this PR finished? I'm happy to help. |
@johnpaulett Any update on this PR, we are also waiting for this feature to be implemented as it would be incredibly handy for our testing. |
Could this PR be merged or are there any blockers left? |
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.
My apologies for the delay. Here is what I think this needs to get merged
- I do not understand the need for the
duration
. Can we simply check for the end of LLP messageEB + CR
with atimeout
in awhile True
? The duration means that every send (even to servers that send back in a single TCP message) will take a minimum of 3 seconds by default. Unless a strong case for theduration
on top of the end of LLP + timeout can be made, I believe we should remove the duration aspect. - Please remove the logging here -- it doesn't add any benefit: we're just logging the returned value which the caller of the MLLPClient could do if it wishes and we already get to stdout when called via
mllp_send
I'm not opposed to switching to argparse, but in the future would suggest separate PRs as the code improvement of upgrading to argparse is unrelated to issue of #44.
try: | ||
mllp_send(sys.argv) | ||
except CLIException as err: | ||
sys.exit(err.exit_code) |
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.
This is going to hide the actual stack trace of what went wrong, isn't it. E.g. it won't be clear if it was a TimeoutError or a parsing exception?
fix #44