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

Get comments for questions and answers #43

Merged
merged 2 commits into from
Mar 14, 2021
Merged

Get comments for questions and answers #43

merged 2 commits into from
Mar 14, 2021

Conversation

c-schuhmann
Copy link
Contributor

Like mentioned in #32.

@c-schuhmann
Copy link
Contributor Author

Error: Timeout of 2000ms exceeded.
I think we should set a higher timeout, because it timed out multiple times on my machine, even on methods I left untouched.
What do you think?

@Trott
Copy link
Collaborator

Trott commented Mar 14, 2021

Error: Timeout of 2000ms exceeded.
I think we should set a higher timeout, because it timed out multiple times on my machine, even on methods I left untouched.
What do you think?

The problem usually isn't the timeout. That's an artifact of the test framework. The problem is usually that the endpoint is reporting too much usage and a "you're throttled, try again later" JSON payload. At least, that's what I've seen in a number of situations.

So there are two things to do here:

  1. Replace the actual calls to StackExchange with calls mocked by nock.
  2. Improve the error reporting by the test tools.

If we do those things and there's still evidence that the timeout needs to be increased, then hey, OK. I've upped the timeout to 30 seconds though and still seen these errors, and then found out they weren't really timeouts when I dug in.

All that said, something that allows you to specify a timeout on the command line when you run the tests locally would be fine to do immediately if that would be useful.

@@ -1,6 +1,7 @@
coverage/
node_modules/
.idea
.vscode
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is fine, but FYI you can add .vscode to your .gitignore file in your home directory (assuming you develop projects in subdirectories of your home directory) and it will apply to everything everywhere and you'll never need to add this to a project .gitignore file again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I actually didn't knew that!

Copy link
Collaborator

@Trott Trott left a comment

Choose a reason for hiding this comment

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

LGTM. Optional addition: You can add an example in the README file. Or not!

@Trott Trott merged commit 1006ab5 into Swaagie:master Mar 14, 2021
@Trott
Copy link
Collaborator

Trott commented Mar 14, 2021

Landed and published in 1.3.0! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants