Skip to content

logictest: deflake tests with async statements#79628

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
AlexTalks:fix_async_logictest
Apr 8, 2022
Merged

logictest: deflake tests with async statements#79628
craig[bot] merged 1 commit intocockroachdb:masterfrom
AlexTalks:fix_async_logictest

Conversation

@AlexTalks
Copy link
Copy Markdown
Contributor

@AlexTalks AlexTalks commented Apr 8, 2022

While async statements in logictests were introduced in #79010, in some
cases tests with async statements would fail due to a race condition.
This is fixed by updating the logic such that when an async statement is
issued, the goroutine running that statement is ensured to have started
before execution continues to other lines in the test.

Fixes #79565.

Release note: None

Release Justification: Testing change only.

While async statements in logictests were introduced in cockroachdb#79010, in some
cases tests with async statements would fail due to a race condition.
This is fixed by updating the logic such that when an async statement is
issued, the goroutine running that statement is ensured to have started
before execution continues to other lines in the test.

Fixes cockroachdb#79565.

Release note: None
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @AlexTalks)

@AlexTalks
Copy link
Copy Markdown
Contributor Author

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Apr 8, 2022

Build succeeded:

@craig craig bot merged commit 51aed4d into cockroachdb:master Apr 8, 2022
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Apr 8, 2022

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from ea00dcc to blathers/backport-release-22.1-79628: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 22.1.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

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.

sql/logictest: TestLogic failed

3 participants