-
Notifications
You must be signed in to change notification settings - Fork 18k
tour: Add tests for web crawler task #14480
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
Comments
We should probably rework the example to be something that is more achievable in the context of a web browser. We should also fix the official solution if it is broken. |
@amorgun have you tried running your solution against Go 1.6? On my machine your test cases trigger a concurrent map write panic:
Your test harness has a bug:
The The fix is to declare the
|
I will try to work on it from tomorrow. |
I'm not sure we should add more tests for the example (since all the examples don't have tests). But I do think we should update the example to make it correct. |
Context: https://tour.golang.org/concurrency/10
I think web crawler task is harder than it looks. I saw a lot of solutions and all of them are wrong, even the official one.
In order to prove that I have written some tests and script to run them on multiple solutions. You can see results here.
I suggest adding these tests to the task the same way as in the word count task.
The text was updated successfully, but these errors were encountered: