Add HANA to the lookup of well-known databases

See gh-15125
pull/15153/head
Jonathan Bregler 6 years ago committed by Stephane Nicoll
parent 0c3056780d
commit 85754eaddd

@ -53,6 +53,7 @@ final class DatabaseLookup {
map.put(DatabaseDriver.SQLSERVER, Database.SQL_SERVER); map.put(DatabaseDriver.SQLSERVER, Database.SQL_SERVER);
map.put(DatabaseDriver.DB2, Database.DB2); map.put(DatabaseDriver.DB2, Database.DB2);
map.put(DatabaseDriver.INFORMIX, Database.INFORMIX); map.put(DatabaseDriver.INFORMIX, Database.INFORMIX);
map.put(DatabaseDriver.HANA, Database.HANA);
LOOKUP = Collections.unmodifiableMap(map); LOOKUP = Collections.unmodifiableMap(map);
} }

@ -91,6 +91,10 @@ public class DatabaseLookupTests {
public void getDatabaseWhenInformixShouldReturnInformix() throws Exception { public void getDatabaseWhenInformixShouldReturnInformix() throws Exception {
testGetDatabase("jdbc:informix-sqli:", Database.INFORMIX); testGetDatabase("jdbc:informix-sqli:", Database.INFORMIX);
} }
@Test
public void getDatabaseWhenSapShouldReturnHana() throws Exception {
testGetDatabase("jdbc:sap:", Database.HANA);
}
private void testGetDatabase(String url, Database expected) throws Exception { private void testGetDatabase(String url, Database expected) throws Exception {
DataSource dataSource = mock(DataSource.class); DataSource dataSource = mock(DataSource.class);

Loading…
Cancel
Save