Skip to content
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

TokenPool: Add debug logging helper + return correct error #2400

Merged
merged 6 commits into from
Dec 2, 2018

Conversation

paulmelnikow
Copy link
Member

Slice another sliver from #1205.

Slice another sliver from #1205.
@paulmelnikow paulmelnikow added core Server, BaseService, GitHub auth, Shared helpers blocker PRs and epics which block other work labels Nov 26, 2018
@shields-ci
Copy link

Messages
📖 ✨ Thanks for your contribution to Shields, @paulmelnikow!

Generated by 🚫 dangerJS

@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-2400 November 26, 2018 22:51 Inactive
@paulmelnikow paulmelnikow changed the title TokenPool: Add debug logging helper TokenPool: Add debug logging helper + return correct error Nov 27, 2018
@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-2400 November 27, 2018 01:53 Inactive
while (
!this.priorityQueue.isEmpty() &&
(next = this.priorityQueue.peek())
) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the bug fix ^^

context('when empty', function() {
it('next() should return the expected error', function() {
const tokenPool = new TokenPool()
expect(() => tokenPool.next()).to.throw('Token pool is exhausted')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously the error was Priority queue is empty, which is incorrect.

@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-2400 November 27, 2018 01:55 Inactive
@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-2400 November 27, 2018 02:00 Inactive
@PyvesB PyvesB self-requested a review December 1, 2018 14:45
Copy link
Member

@PyvesB PyvesB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from a small mistake in a test's description, this looks good to me! 👍

})
})

context('with sanitize: true', function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean "false" here?

@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-2400 December 1, 2018 18:49 Inactive
@shields-deployment
Copy link

This pull request was merged to master branch. This change is now waiting for deployment, which will usually happen within a few days. Stay tuned by joining our #ops channel on Discord!

After deployment, changes are copied to gh-pages branch:

@paulmelnikow paulmelnikow deleted the token-pool-debugging branch December 2, 2018 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker PRs and epics which block other work core Server, BaseService, GitHub auth, Shared helpers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants