Skip to content

test: remove hardcoded queue integration timeout and parallelize workers - #432

Merged
sbalabanov merged 3 commits into
mainfrom
fix/messagequeue-test-completion
Jul 23, 2026
Merged

test: remove hardcoded queue integration timeout and parallelize workers#432
sbalabanov merged 3 commits into
mainfrom
fix/messagequeue-test-completion

Conversation

@sbalabanov

@sbalabanov sbalabanov commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Improve Integration Test Runtime
Remove hardcoded timeout in lieu of Bazel's timeout

Summary

  • coordinate concurrent MySQL message-queue test receivers through one shared result channel
  • keep message aggregation and duplicate tracking exclusively on the main test goroutine, without mutexes or a wait group
  • acknowledge each delivery before reporting it, cancel on successful completion or the first real worker error, and consume every worker's terminal result before returning
  • distinguish expected context cancellation after completion/error from standalone cancellation that must fail the test
  • remove local integration-test safety timeouts and rely on Bazel's test timeout for stuck tests

Benchmark

Uncached Bazel test attempt runtime:

  • before: 58.3s
  • after: 38.3s
  • improvement: 20.0s (~34%)

Tests

  • ./tool/bazel test //test/integration/extension/messagequeue/mysql:go_default_test --nocache_test_results --test_output=errors --strategy=TestRunner=local ...
  • ./tool/bazel test //test/integration/extension/messagequeue/mysql:go_default_test --nocache_test_results --test_output=errors --strategy=TestRunner=local --@rules_go//go/config:race ...
  • make fmt
  • make lint
  • make check-tidy
  • make check-gazelle

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread test/integration/extension/messagequeue/mysql/queue_test.go Outdated
@sbalabanov sbalabanov changed the title test: stop message queue receivers on completion test: remove hardcoded queue integration timeout Jul 23, 2026
Comment thread test/integration/extension/messagequeue/mysql/queue_test.go
@sbalabanov
sbalabanov marked this pull request as ready for review July 23, 2026 19:48
@sbalabanov
sbalabanov requested review from a team and behinddwalls as code owners July 23, 2026 19:48
@sbalabanov sbalabanov changed the title test: remove hardcoded queue integration timeout test: remove hardcoded queue integration timeout and parallelize workers Jul 23, 2026
@sbalabanov
sbalabanov added this pull request to the merge queue Jul 23, 2026
@sbalabanov
sbalabanov removed this pull request from the merge queue due to a manual request Jul 23, 2026
@sbalabanov
sbalabanov merged commit 1ee1f1f into main Jul 23, 2026
26 of 27 checks passed
@behinddwalls
behinddwalls deleted the fix/messagequeue-test-completion branch July 23, 2026 20:05
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.

4 participants