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

[Issue 1173] In "SendAndReceive", wait 100ms before reading #1174

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

jochenehret
Copy link
Contributor

@jochenehret jochenehret commented Jul 11, 2024

What is this change about?

Prevents race condition when sending a test message to a backend and reading the response.

Please provide contextual information.

#1173

What version of cf-deployment have you run this cf-acceptance-test change against?

v41.0.0

Please check all that apply for this PR:

  • introduces a new test --- Are you sure everyone should be running this test?
  • changes an existing test
  • requires an update to a CATs integration-config

Did you update the README as appropriate for this change?

  • YES
  • N/A

If you are introducing a new acceptance test, what is your rationale for including it CATs rather than your own acceptance test suite?

How many more (or fewer) seconds of runtime will this change introduce to CATs?

Function is called 7 times -> 700ms.

What is the level of urgency for publishing this change?

  • Urgent - unblocks current or future work
  • Slightly Less than Urgent

Tag your pair, your PM, and/or team!

It's helpful to tag a few other folks on your team or your team alias in case we need to follow up later.

* "conn.Read(buff)" can return EOF if the backend does not send the reply fast enough
@jochenehret jochenehret requested review from a team July 12, 2024 06:09
Copy link
Member

@ctlong ctlong left a comment

Choose a reason for hiding this comment

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

Could we resolve the problem by using an Eventually when calling SendAndReceive instead? I would prefer that approach in order to allow the test to succeed faster, if possible.

@jochenehret
Copy link
Contributor Author

Using Eventually when calling SendAndReceive could also fix the problem. But logically, I think it makes sense to add a short wait before the Read call. The tests are running on our K8s Concourse on GCP. The test apps runs on an AWS account behind a network load balancer. So the full roundtrip is expected to take a short amount of time. I would propose to wait 100ms and see how that works.

* shorten wait from 2s to 100ms and see if that stabilizes the test
@jochenehret jochenehret changed the title [Issue 1173] In "SendAndReceive", wait 2 seconds before reading [Issue 1173] In "SendAndReceive", wait 100ms before reading Jul 16, 2024
@jochenehret jochenehret merged commit f13ba8f into develop Jul 17, 2024
3 checks passed
@jochenehret jochenehret deleted the issue_1173 branch July 17, 2024 12:51
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