* @throws Exception
* if the test fails.
*/
public void testChangeUserAndCharsets() throws Exception {
if (versionMeetsMinimum(4, 1)) {
MysqlConnectionPoolDataSource ds = new MysqlConnectionPoolDataSource();
ds.setURL(BaseTestCase.dbUrl);
ds.setCharacterEncoding("utf-8");
PooledConnection pooledConnection = ds.getPooledConnection();
Connection connToMySQL = pooledConnection.getConnection();
this.rs = connToMySQL.createStatement().executeQuery(
"SELECT @@character_set_results");
assertTrue(this.rs.next());