Revision 45fd6fd3
Added by Andreas Müller about 5 years ago
cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/database/CdmPersistentDataSourceTest.java | ||
---|---|---|
159 | 159 |
*/ |
160 | 160 |
@Test |
161 | 161 |
public void testGetDbProperty() { |
162 |
assertEquals("com.mysql.jdbc.Driver", dataSource.getCdmSourceProperty(CdmSourceProperties.DRIVER_CLASS)); |
|
162 |
assertEquals("com.mysql.cj.jdbc.Driver", dataSource.getCdmSourceProperty(CdmSourceProperties.DRIVER_CLASS));
|
|
163 | 163 |
} |
164 | 164 |
|
165 | 165 |
/** |
... | ... | |
169 | 169 |
public void testGetDatasourceBean() { |
170 | 170 |
BeanDefinition beanDef = dataSource.getDatasourceBean(); |
171 | 171 |
PropertyValues propValues = beanDef.getPropertyValues(); |
172 |
String propName = "driverClassName";
|
|
173 |
assertEquals("com.mysql.jdbc.Driver", propValues.getPropertyValue(propName).getValue()); |
|
174 |
propName = "url";
|
|
172 |
String propName = "driverClassName"; |
|
173 |
assertEquals("com.mysql.cj.jdbc.Driver", propValues.getPropertyValue(propName).getValue());
|
|
174 |
propName = "url"; |
|
175 | 175 |
assertEquals("testUrl", propValues.getPropertyValue(propName).getValue()); |
176 |
propName = "username";
|
|
176 |
propName = "username"; |
|
177 | 177 |
assertEquals("testUser", propValues.getPropertyValue(propName).getValue()); |
178 |
propName = "password";
|
|
178 |
propName = "password"; |
|
179 | 179 |
assertEquals("testPassword", propValues.getPropertyValue(propName).getValue()); |
180 | 180 |
} |
181 | 181 |
|
Also available in: Unified diff
ref #8118 update mysql driver path in code and tests