Skip to content

ci: run a MySQL server for the live database test in core-data - #1210

Merged
ZhuchkaTriplesix merged 2 commits into
devfrom
ci/mysql-service
Oct 9, 2026
Merged

ZhuchkaTriplesix merged 2 commits into
devfrom
ci/mysql-service

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Refs #1207

Why

test/core/database/stream_take_drain_test.dart checks COM_QUERY draining against a live MySQL. It skipped in CI with "MySQL is not listening on 127.0.0.1:3306", so the behaviour against a real server was never checked.

Change

  • In the core-data job only, and only on GitHub-hosted runners, a mysql:8.0 container starts on port 3306 with the querya user and database the test reads from its defaults.
  • The step waits until mysqladmin ping answers, and fails with the container log if it never does.

Not verified locally

Tests were not run locally, per the project rule. Expected in CI: the live test runs and passes, and the core-data job takes a little longer for the container start.

The live MySQL COM_QUERY test skipped in CI because no server listened on
127.0.0.1:3306, so the drain behaviour against a real server was never checked.
The core-data job now starts a MySQL 8 container with the querya user and
database the test reads from its defaults, and waits until it answers.
The live test failed: MySQL 8's default auth plugin, caching_sha2_password,
needs a secure connection, and the client connects without TLS here. The test
server now uses mysql_native_password.
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit d8791f0 into dev Oct 9, 2026
13 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the ci/mysql-service branch October 11, 2026 15:02
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.

1 participant