Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No flexibility in specifying Marklogic Connection URI #1

Open
GoogleCodeExporter opened this issue Apr 29, 2015 · 5 comments
Open

No flexibility in specifying Marklogic Connection URI #1

GoogleCodeExporter opened this issue Apr 29, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant