Silence deprecation warning in test

Missed a case that only occured for mysql/mysql2
Merge pull request #15371 from sgrif/sg-silence-deprecation-warning

Silence deprecation warning in test