import java.sql.SQLException; import java.sql.*; public class Bug15514 extends junit.framework.TestCase { // some neverland protected static String dbUrl = "jdbc:mysql://finger.to.the.sky/test?"; public Bug15514(String name) { super(name); } public void setUp() throws Exception { Class.forName("com.mysql.jdbc.Driver").newInstance(); } public void testFingerToSky() throws SQLException { int ercode = 0; try{ Connection conn = DriverManager.getConnection(dbUrl,"root",""); } catch (SQLException e) { ercode = e.getErrorCode(); junit.framework.Assert.assertTrue("Errcode must not be 0 here",ercode != 0); } } public void tearDown() throws Exception { super.tearDown(); } public static void main(String args[]) throws Exception { junit.textui.TestRunner.run(Bug15514.class); } }