Skip to content

Commit

Permalink
#338 Fix AntMetDdataExporterTest
Browse files Browse the repository at this point in the history
  • Loading branch information
timowest committed Feb 5, 2013
1 parent 811a650 commit 2c7ad60
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
Expand Up @@ -220,7 +220,7 @@ public void export(DatabaseMetaData md) throws SQLException {
types.add("VIEW");
}

ResultSet tables = md.getTables(null, schemaPattern, tableNamePattern, types.toArray(new String[0]));
ResultSet tables = md.getTables(null, schemaPattern, tableNamePattern, types.toArray(new String[types.size()]));
try{
while (tables.next()) {
handleTable(md, tables);
Expand Down
Expand Up @@ -16,13 +16,34 @@
import static org.junit.Assert.assertTrue;

import java.io.File;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

import org.junit.Before;
import org.junit.Test;

public class AntMetaDataExporterTest {

private final String url = "jdbc:h2:mem:testdb" + System.currentTimeMillis();
// private final String url = "jdbc:h2:mem:testdb" + System.currentTimeMillis();
private final String url = "jdbc:h2:target/h2" + System.currentTimeMillis();

@Before
public void setUp() throws SQLException {
Connection conn = DriverManager.getConnection(url, "sa", "");
try {
Statement stmt = conn.createStatement();
try {
stmt.execute("create table test (id int)");
} finally {
stmt.close();
}
} finally {
conn.close();
}
}

@Test
public void Execute(){
AntMetaDataExporter exporter = new AntMetaDataExporter();
Expand Down

0 comments on commit 2c7ad60

Please sign in to comment.