-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Service Bus] Remove test reference in src and fix test failures #8664
[Service Bus] Remove test reference in src and fix test failures #8664
Conversation
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.
Normally instanceof
checks scare me since it would fail if the instance of that class you had came from a different copy of the library it's exported from...but in this case it's done internally and we know MessagingError is coming from core-amqp.
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.
Looks okay. I do wish we could just establish that the value of the error is undefined and just not keep handling it (there are two spots in there where we properly handle it but it's not obvious).
@@ -1214,7 +1214,7 @@ describe("Streaming - onDetached", function(): void { | |||
await receiverIsActive; | |||
|
|||
// Simulate onDetached being called with a non-retryable error. | |||
const nonRetryableError = translate(new Error(`I break systems.`)); | |||
const nonRetryableError = new MessagingError(`I break systems.`); |
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 the MessagingError class, retryable
is set to true by default. So why this change?
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.
The next line sets retryable to false :)
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 the very next line, we set the retryable flag to false.
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.
And previously, translate wasn't converting this to a MessagingError (it did in amqp-common)
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 to that.
Since the last commit to that PR changed the logic of handling the non-messaging-errors, these tests failed.
If I had executed these tests in that PR before merging, would've captured the issue much before.
/azp run js - servicebus - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
What two spots, @richardpark-msft ? |
The 4 "disconnect" tests failed in the browser
/cc - @chradek |
MessagingError
an actualMessagingError