-
Notifications
You must be signed in to change notification settings - Fork 47
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
Fix livetest error and compatibility with EventHub Track1 #78
Conversation
89aea4c
to
f8d878e
Compare
self.loop = get_running_loop() | ||
except AttributeError: | ||
self.loop = get_running_loop() | ||
|
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.
I think this code could be simplified with:
self.loop = loop
if not self.loop:
self.loop = get_running_loop()
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.
I'm afraid we can't simplify it this way.
For an instance of SendClientAsync which extends from AMQPClientAsync, it first initializes its own self.loop member in the SendClientAsync constructor and then it will call its fathers init function. If we write self.loop = loop in AMQPClientAsync constructor, the loop member instance of the SendClientAsync will be overwritten to None (The default loop parameter is None in AMQPClientAsync init) which leads to a bug.
Let me know if you want a more detailed explanation.
* Bug fixes in client * CI fixes * More bug fixes + package updates * Fixed pylint * Fixed 2.7 pylint * Fix memory leak problem in sending BatchEventData (#70) * Missing application_properties in BatchMessage fixes * Missing data bytes in BatchMessage fixes * Updated pylint version This should resolve Travis error: `AttributeError: 'Import' object has no attribute 'infer_name_module'` * improve type checking to enable message-like objects in BatchMessage * pylint error fixes * remove Python 3.4 from the travis config as Python 3.4 won't be supported from the next release * Fix memory leak in sending BatchEventData * improve solution by typecasting NULL to AMQP types * Remove explicit test directory * Separate test passes * Some test updates * Turned off test debug * Fixed proxy test * Adding livetest yaml (#71) * adding evenhub secrets to livetest for UAMQP * Splitting client.yml into a livetest build with environment variables set + maxparallel set to 1. This will ensure that any livetests won't accidentally stomp on each other. * Trying latest cython * Reverting Cython version * Conditionally Disable Py38 (#72) * adding evenhub secrets to livetest for UAMQP * trying an adjustment of the build to see if continueonError will work * removing extra variables in client.yml * missed a single addition * regular variable access * trying without quotes * disabling python 3.8 * removing shenanigans with continueonerror * fixing the ordering * Event Hub Track 2 Support (#74) * Missing application_properties in BatchMessage fixes * Missing data bytes in BatchMessage fixes * Updated pylint version This should resolve Travis error: `AttributeError: 'Import' object has no attribute 'infer_name_module'` * improve type checking to enable message-like objects in BatchMessage * pylint error fixes * remove Python 3.4 from the travis config as Python 3.4 won't be supported from the next release * Fix memory leak in sending BatchEventData * improve solution by typecasting NULL to AMQP types * init commit for websocket support * Websocket functionality done, but further design is needed * Reorganzie WebSocket related code * Remove unnecessary tls http_proxy setting * Module import and proxy username password update * Update comment * Update code * Fix pylint error * OAuth support * Add Message app_prop checking * Remove scope * Updated proxy test * Event Hub Track 2 Support (#75) * Missing application_properties in BatchMessage fixes * Missing data bytes in BatchMessage fixes * Updated pylint version This should resolve Travis error: `AttributeError: 'Import' object has no attribute 'infer_name_module'` * improve type checking to enable message-like objects in BatchMessage * pylint error fixes * remove Python 3.4 from the travis config as Python 3.4 won't be supported from the next release * Fix memory leak in sending BatchEventData * improve solution by typecasting NULL to AMQP types * init commit for websocket support * Websocket functionality done, but further design is needed * Reorganzie WebSocket related code * Remove unnecessary tls http_proxy setting * Module import and proxy username password update * Update comment * Update code * Fix pylint error * OAuth support * Add Message app_prop checking * Remove scope * Add async jwt token support * Update max message size * Fix pylint error * Code improvement * Fix mistake * Update code 1. Add MessageContentTooLarge error and will be raised when BatchMessage content is too large 2. Remove useless raise in cbs_auth_async * Update history * Add missing raise and correct misspelling (#77) * Fix livetest error and compatibility with EventHub Track1 (#78) * Update prefetch count in test * Fix getting loop bug * Lower logging level as too many logs will cause memory error in test pipeline * Update prefetch count for the live test * Update pretech count * Update docstring of timeout type from int to float as part of the guideline
No description provided.