-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Issue 3127][python-client] Replace Exceptions with PulsarExceptions #7600
[Issue 3127][python-client] Replace Exceptions with PulsarExceptions #7600
Conversation
5506d05
to
bc6d73e
Compare
15d9a32
to
3d40f20
Compare
Is it possible to re-run all tests? Logs have expired and it's impossible to see what failed:( |
@n0nvme rebase and resolve all conflicts first , then push those changes the tests will rerun. |
948c06a
to
1566476
Compare
@n0nvme @aahmed-se I rebased and improved the PR a bit. Some tests are failing, although they seem flaky to me. Let me know if you have any comments. |
@BewareMyPower PTAL |
self.assertTrue(False) # Should not reach this point | ||
except: | ||
pass # Exception is expected | ||
with self.assertRaises(PulsarException): |
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.
In these tests, could we assert for pulsar.Timeout
exception?
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.
Yes, refactored
1566476
to
f350701
Compare
/pulsarbot run-failure-checks |
Fixes #7600
Motivation
As the issue says, the Python client throws
Exception
s instead of a subclass of it (PulsarException
), so the clients must catch the blanket Exception.Modifications
Every C
PulsarException
is now thrown in Python with the same type.Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation