Skip to content

Commit

Permalink
increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Jan 14, 2025
1 parent 14e50f1 commit 354242d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ module.exports = function (dependencies) {
retryStatusCodes.includes(error.status) ||
(typeof error.error !== 'undefined' &&
error.status == 403 &&
error.error.message.includes('ExpiredProviderToken'))
error.error.message === 'ExpiredProviderToken')
) {
try {
const resentRequest = await this.retryRequest(
Expand Down Expand Up @@ -260,7 +260,7 @@ module.exports = function (dependencies) {
retryStatusCodes.includes(error.status) ||
(typeof error.error !== 'undefined' &&
error.status == 403 &&
error.error.message.includes('ExpiredProviderToken'))
error.error.message === 'ExpiredProviderToken')
) {
try {
const resentRequest = await this.retryRequest(
Expand Down
2 changes: 2 additions & 0 deletions test/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ describe('Client', () => {
runSuccessfulRequest(),
]);
didRequest = false;
client.destroySession(); // Don't pass in session to destroy, should not force a disconnection.
await runSuccessfulRequest();
expect(establishedConnections).to.equal(1); // should establish a connection to the server and reuse it
expect(requestsServed).to.equal(6);
Expand Down Expand Up @@ -1655,6 +1656,7 @@ describe('ManageChannelsClient', () => {
runSuccessfulRequest(),
]);
didRequest = false;
client.destroySession(); // Don't pass in session to destroy, should not force a disconnection.
await runSuccessfulRequest();
expect(establishedConnections).to.equal(1); // should establish a connection to the server and reuse it
expect(requestsServed).to.equal(6);
Expand Down

0 comments on commit 354242d

Please sign in to comment.