Skip to content

Commit

Permalink
Fix marklogic-community#573 Only show suite setup/teardown results if…
Browse files Browse the repository at this point in the history
… they exist.

There should only be a t:test element for suite-setup.xqy and
suite-teardown.xqy when those files exist.

This is applying feedback from @dmcassel.
  • Loading branch information
reecedunn67 committed Jul 21, 2016
1 parent 0194946 commit 087e96a
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/test/default.xqy
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,7 @@ declare function t:run-suite($suite as xs:string, $tests as xs:string*, $run-sui
catch($ex) {
if ($ex/error:code = "XDMP-MODNOTFOUND" and
fn:matches($ex/error:stack/error:frame[1]/error:uri/fn:string(), "/suite-setup.xqy$")) then
element t:test {
attribute name { "suite-setup.xqy" },
attribute time { functx:total-seconds-from-duration(xdmp:elapsed-time() - $start-time) },
element t:result {
attribute type {"success"}
}
}
()
else
element t:test {
attribute name { "suite-setup.xqy" },
Expand Down Expand Up @@ -167,13 +161,7 @@ declare function t:run-suite($suite as xs:string, $tests as xs:string*, $run-sui
catch($ex) {
if ($ex/error:code = "XDMP-MODNOTFOUND" and
fn:matches($ex/error:stack/error:frame[1]/error:uri/fn:string(), "/suite-teardown.xqy$")) then
element t:test {
attribute name { "suite-teardown.xqy" },
attribute time { functx:total-seconds-from-duration(xdmp:elapsed-time() - $start-time) },
element t:result {
attribute type {"success"}
}
}
()
else
element t:test {
attribute name { "suite-teardown.xqy" },
Expand Down

0 comments on commit 087e96a

Please sign in to comment.