Open peetkes opened 1 year ago
I agree with the sentiment about implied topology for unit tests.
There's also a slight performance penalty for using a server field vs a "build" time injection from ml-gradle. To my knowledge everyone loads their tests using ml-gradle.
That being said I don't believe I've used a debug wait before, so I don't have personal experience setting this variable or an issue with the default timeout.
On Wed, Sep 6, 2023 at 8:26 AM Mads Hansen @.***> wrote:
@.**** commented on this pull request.
In marklogic-unit-test-modules/src/main/ml-modules/root/test/test-coverage.xqy https://github.com/marklogic-community/marklogic-unit-test/pull/185#discussion_r1317202916 :
@@ -71,8 +73,8 @@ declare private function cover:_task-cancel-safe( for $breakpoint in dbg:breakpoints($id) return dbg:clear($id, $breakpoint), dbg:detach($id),
- if (fn:empty(dbg:wait($id, 10))) then
- fn:error(xs:QName("FAILED-TO-CANCEL"), "unable to cancel a debugging request")
- if (fn:empty(dbg:wait($id, if ($TIMEOUT eq "%%mlDebugWaitTimeout%%") then $DEFAULT_TIMEOUT else $TIMEOUT)))
Expecting a single node to be used and NOT a load balancer feels brittle.
— Reply to this email directly, view it on GitHub https://github.com/marklogic-community/marklogic-unit-test/pull/185#discussion_r1317202916, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBA7LUJZ5I3QIL5YLX4C7LXZBTYXANCNFSM6AAAAAA3NCHQUA . You are receiving this because you are subscribed to this thread.Message ID: <marklogic-community/marklogic-unit-test/pull/185/review/1613209771@ github.com>
We could adopt MLUT as an acronym for brevity of MarkLogic Unit Test which would yield mlutDebugTimout as a variable name.
On Wed, Sep 6, 2023 at 9:45 AM Rob Rudin @.***> wrote:
@.**** commented on this pull request.
In marklogic-unit-test-modules/src/main/ml-modules/root/test/test-coverage.xqy https://github.com/marklogic-community/marklogic-unit-test/pull/185#discussion_r1317311653 :
@@ -71,8 +73,8 @@ declare private function cover:_task-cancel-safe( for $breakpoint in dbg:breakpoints($id) return dbg:clear($id, $breakpoint), dbg:detach($id),
- if (fn:empty(dbg:wait($id, 10))) then
- fn:error(xs:QName("FAILED-TO-CANCEL"), "unable to cancel a debugging request")
- if (fn:empty(dbg:wait($id, if ($TIMEOUT eq "%%mlDebugWaitTimeout%%") then $DEFAULT_TIMEOUT else $TIMEOUT)))
That's fair. How about if we do %%marklogicUnitTestDebugTimeout%%? That makes it clear it's specific to marklogic-unit-test (wish that itself had a much shorter, snappier name).
— Reply to this email directly, view it on GitHub https://github.com/marklogic-community/marklogic-unit-test/pull/185#discussion_r1317311653, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBA7LVVB2BS5TBDCEGDLMTXZB47NANCNFSM6AAAAAA3NCHQUA . You are receiving this because you commented.Message ID: @.*** .com>
Can be set in gradle properties by specifying a value for mlDebugWaitTimeout