Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332340 - ClientDriverTests do not create the DB
Summary: ClientDriverTests do not create the DB
Status: RESOLVED FIXED
Alias: None
Product: Gemini.DBaccess
Classification: RT
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-10 15:46 EST by Tom Ware CLA
Modified: 2010-12-10 15:58 EST (History)
1 user (show)

See Also:
michael.keith: iplog+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.