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

Add more detailed test for fetching sourcemap from multiple fleet servers #5836

Closed
estolfo opened this issue Jul 30, 2021 · 1 comment · Fixed by #6699
Closed

Add more detailed test for fetching sourcemap from multiple fleet servers #5836

estolfo opened this issue Jul 30, 2021 · 1 comment · Fixed by #6699
Assignees
Milestone

Comments

@estolfo
Copy link
Contributor

estolfo commented Jul 30, 2021

As per this comment, add a more detailed test for fetching sourcemap from multiple fleet servers when some fail and some succeed.

  • call fetch in a goroutine
  • block until all servers have received their request
  • have ts0 respond with failure
  • have ts1 respond with success
  • block until ts2's request is cancelled
@estolfo estolfo self-assigned this Jul 30, 2021
@simitt simitt added the v7.16.0 label Aug 23, 2021
@simitt simitt added this to the 7.16 milestone Aug 23, 2021
@zube zube bot added the [zube]: Ready label Aug 23, 2021
@zube zube bot assigned estolfo and unassigned stuartnelson3 Oct 11, 2021
@simitt simitt added v8.0.0 and removed v7.16.0 labels Nov 10, 2021
@simitt simitt modified the milestones: 7.16, 8.0 Nov 10, 2021
@stuartnelson3
Copy link
Contributor

Was taking a look at this, and I don't think there's a way to block within the test code until ts2's request has been canceled. As the fetching code is written, as soon as we get a successful response, we return to the caller. We have no way to know, from the test server's perspective, if the client we're writing to is still reading on the other side. Additionally, even though the fetching code has returned, the test server is still able to successfully write a response.

I added a test which blocks until all test servers have received their requests, and then verifies that the fetching code returns after a successful request, but before the 3rd (and final) test server handler has finished executing. I was able to verify via print statements that the 3rd request is being canceled and the results channel being ranged over is successfully closed.

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

Successfully merging a pull request may close this issue.

3 participants