Feature Request: Global connection file

Sujit Pal
  • Sujit Pal

    Sujit Pal - 2004-01-07

    Andrei Grigoriev made the following request by email:
    I am thinking about one feature that may be useful. We
    keep all test files in the source control, and if we
    need to change database connection than it requires to
    checking out and checking in all files, which may be
    huge work. Whan if SQL Unit will have one file per
    root directory and use overriden connection string
    from that file?

    • Simon James Gibbs

      ANT properties?

      • Sujit Pal

        Sujit Pal - 2004-01-08

        Yes, but SQLUnit must recognize the properties passed in. Currently it does not, so I was thinking something along these lines...
        - Look first under the connection tag. Currently it supports 1 or more entries, it should be changed to support 0 or more entries.
        - If not found, look in the system properties for connection information (passed in via ant properties).
        - If no system properties are found, look for a file sqlunit.properties in the current directory, then in the caller's classpath.
        Not found? Give up with error messsage.

        I seem to remember using a propfile with ant, so maybe thats something to look at too.

        Hows that sound?


    • Sujit Pal

      Sujit Pal - 2004-01-09

      This is in CVS already, but I need to test it some more. Actually, since SQLUnit has grown from one method of getting a Connection object to about 5 or 6 distinct ones, I just thought it made sense to do some major refactoring. The refactoring is backwards compatible, I just tested with some existing test cases, but I still need to check the new functionality. Should be done tonight or so.



Log in to post a comment.