#44 mllp client: read full response from the server#49
#44 mllp client: read full response from the server#49cezio wants to merge 3 commits intojohnpaulett:mainfrom
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? |
johnpaulett
left a comment
There was a problem hiding this comment.
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 + CRwith atimeoutin 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 thedurationon 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.
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