Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332340

Summary: ClientDriverTests do not create the DB
Product: [RT] Gemini.DBaccess Reporter: Tom Ware <tom.ware>
Component: CoreAssignee: Project Inbox <gemini.dbaccess-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: michael.keith
Version: unspecifiedFlags: michael.keith: iplog+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tom Ware CLA 2010-12-10 15:46:06 EST
In ClientDriverTests

    Properties getUrlProperties() {
        Properties props = new Properties();
        props.put(DataSourceFactory.OSGI_JDBC_DRIVER_NAME,
                "org.apache.derby.jdbc.ClientDriver");
        props.put(DataSourceFactory.JDBC_URL,
                "jdbc:derby://localhost:1527/accountDB");
        props.put(DataSourceFactory.JDBC_USER, "app");
        props.put(DataSourceFactory.JDBC_PASSWORD, "app");
        return props;
    }

Does not specify create=true.  This means there will be a failure for anyone running the tests for the first time.

Code should be:

    Properties getUrlProperties() {
        Properties props = new Properties();
        props.put(DataSourceFactory.OSGI_JDBC_DRIVER_NAME,
                "org.apache.derby.jdbc.ClientDriver");
        props.put(DataSourceFactory.JDBC_URL,
                "jdbc:derby://localhost:1527/accountDB;create=true");
        props.put(DataSourceFactory.JDBC_USER, "app");
        props.put(DataSourceFactory.JDBC_PASSWORD, "app");
        return props;
    }
Comment 1 Michael Keith CLA 2010-12-10 15:58:33 EST
Fixed.