5757import schemacrawler .tools .command .text .schema .options .SchemaTextOptions ;
5858import schemacrawler .tools .command .text .schema .options .SchemaTextOptionsBuilder ;
5959import schemacrawler .tools .executable .SchemaCrawlerExecutable ;
60+ import us .fatehi .utility .datasource .DatabaseConnectionSource ;
61+ import us .fatehi .utility .datasource .DatabaseConnectionSourceUtility ;
6062
6163@ TestInstance (Lifecycle .PER_CLASS )
6264public class TeiidTest extends BaseAdditionalDatabaseTest {
6365
64- private Connection connection ;
66+ private DatabaseConnectionSource dataSource ;
6567
6668 @ BeforeAll
6769 public void createDatabase () throws Exception {
@@ -104,7 +106,8 @@ public void createDatabase() throws Exception {
104106
105107 server .deployVDB ("TEEID_VDB" , hsqldbModel , virtualModel );
106108
107- connection = server .getDriver ().connect ("jdbc:teiid:TEEID_VDB" , null );
109+ final Connection connection = server .getDriver ().connect ("jdbc:teiid:TEEID_VDB" , null );
110+ dataSource = DatabaseConnectionSourceUtility .newTestDatabaseConnectionSource (connection );
108111 }
109112
110113 @ Test
@@ -119,7 +122,7 @@ public void testTeiidDump() throws Exception {
119122
120123 final String expectedResource = "testTeiidDump.txt" ;
121124 assertThat (
122- outputOf (executableExecution (connection , executable )),
125+ outputOf (executableExecution (dataSource , executable )),
123126 hasSameContentAs (classpathResource (expectedResource )));
124127 }
125128
@@ -141,7 +144,7 @@ public void testTeiidWithConnection() throws Exception {
141144
142145 final String expectedResource = String .format ("testTeiidWithConnection.%s.txt" , javaVersion ());
143146 assertThat (
144- outputOf (executableExecution (connection , executable )),
147+ outputOf (executableExecution (dataSource , executable )),
145148 hasSameContentAs (classpathResource (expectedResource )));
146149 }
147150
0 commit comments