You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The XQueryTestCase in xquery-unit looks for a specific file to pick xdbc
connection string. These filenames are hardcoded into a field called
DEFAULT_PROPS_LOCATIONS in the XQueryTestCase class. The setUp method searches
for specific property file names as defined by DEFAULT_PROPS_LOCATIONS, loads
the properties, searches for a very SPECIFIC property ("connectionUri") to
load the connectionURI, gets the session and stores it in a PRIVATE field. This
session is used at multiple places in the class.
In my code base, we store marklogic connection details in a file called shared.properties and we do not wish to replicate this in another property file. The shared.properties stores connection settings for each developer. Each developer connects to his own specific instance of marklogic and we generate the connection url dynamically depending on current logged in user. The hardcodings in XQueryTestCase makes it almost unusable in the current scenario. Probably the only workaround solution is to generate a xdbc.property file dynamically while the test class is loaded but this is not a very elegant solution.
It would be very helpful if we can pass the connectionURI from subclasses of XQueryTestCase, without having it hardcoded in specific property files, with specific connection property name. Having a protected method, "getConnectionURI" invoked from "setUp" would solve the purpose.
Original issue reported on code.google.com by [email protected] on 16 Aug 2011 at 11:20
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 16 Aug 2011 at 11:20The text was updated successfully, but these errors were encountered: