asyncer-io / r2dbc-mysql

Reactive Relational Database Connectivity for MySQL. The official successor to mirromutth/r2dbc-mysql(dev.miku:r2dbc-mysql).
https://r2dbc.io
Apache License 2.0
181 stars 18 forks source link

Correct initialization of SSL tunnel tests #231

Closed mirromutth closed 4 months ago

mirromutth commented 4 months ago

Motivation:

If the server uses caching_sha2_password, the first time a client connects to the server, the server will require a native SSL connection. So all the SSL tunnel tests should be run after the caching_sha2_password initialization.

Steps to reproduce:

  1. Restart a MySQL server 8.x, keep it authentication plugin as caching_sha2_password
  2. Run SslTunnelIntegrationTest first, failed
Errors:
  SslTunnelIntegrationTest.sslTunnelConnectionTest » R2dbcPermissionDenied Access denied for user 'root'@'172.18.0.1' (using password: YES)

See also https://github.com/asyncer-io/r2dbc-mysql/actions/runs/7880628673/job/21502952115 . It skipped MariaDbTextIntegrationTest and SslTunnelIntegrationTest was the first case run, so it failed

Modification:

Add an initialization of SslTunnelIntegrationTest, it ensures the server has cached root user.

Result:

SslTunnelIntegrationTest.sslTunnelConnectionTest will not fail due to ordering of tests