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
{{ message }}
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
The test runner code makes it too hard to debug problems in suite-setup.xqy test modules. Most errors get swallowed up by this try-catch block in test/default.xqy.
The logging looks like a good idea, but finding a simple syntax errors requires the user to go turn on the UNIT-TEST trace event. Even that doesn't seem to be documented.
Myself I'd favor simply dropping the try-catch: if my suite-setup fails with any error at all, I want the world to stop. If I want error handling in my suite-setup, I'll code it with an internal try-catch. But I'm guessing there was some reason for this code, so I thought I'd ask before working up a patch.
Is there a use-case that I'm missing?
The text was updated successfully, but these errors were encountered:
Mike, the use case is that there may not be a suite-setup module to run, in which case the invoke will throw an exception. I agree that the current setup makes it hard to debug problems. Let me see what I can do here.
That makes sense. In that case I'd suggest surfacing errors that aren't related to a missing module. So the else clause simply becomes: else xdmp:rethrow().
Fixed in the dev branch. I updated the catches around suite-setup, suite-teardown, setup, and teardown. xdmp:rethrow() for anything other than that specific module missing.
The test runner code makes it too hard to debug problems in suite-setup.xqy test modules. Most errors get swallowed up by this try-catch block in
test/default.xqy
.The logging looks like a good idea, but finding a simple syntax errors requires the user to go turn on the UNIT-TEST trace event. Even that doesn't seem to be documented.
Myself I'd favor simply dropping the try-catch: if my suite-setup fails with any error at all, I want the world to stop. If I want error handling in my suite-setup, I'll code it with an internal try-catch. But I'm guessing there was some reason for this code, so I thought I'd ask before working up a patch.
Is there a use-case that I'm missing?
The text was updated successfully, but these errors were encountered: