-
Notifications
You must be signed in to change notification settings - Fork 24
Description
- marklogic-unit-test: 1.3.0
- MarkLogic: 11.0.2
I have a test suite suiteA that has both setup.sjs and suiteSetup.sjs. Nested within suiteA, I had a subdirectories for a related test: verify. This subdirectory had its own suiteSetup.sjs. This worked fine.
I added a new subdirectory remind that has a suiteSetup.sjs. Now when I run suiteA, tests fail because instead of running suiteA/suiteSetup.sjs, it's running suiteA/remind/suiteSetup.sjs.
The suite setup module is identified in the controller by calling test:list-from-database and taking the first module that passes is-suite-setup-module(.). It looks like the modules came back in alphabetical order (document order?) and so suiteA/suiteSetup.sjs was selected before suiteA/verify/suiteSetup.sjs, but suiteA/remind/suiteSetup.sjs messed up the order.
The fix may be as simple as changing the cts:directory-query and xdmp:directory calls from "infinity" to "1", but I haven't tested that.