This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6485 - fn-put-011
Summary: fn-put-011
Status: RESOLVED WONTFIX
Alias: None
Product: XQuery Update Facility Test Suite
Classification: Unclassified
Component: XQuery Update Facility Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-28 13:56 UTC by Michael Kay
Modified: 2009-02-27 20:27 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2009-01-28 13:56:05 UTC
Test fn-put-011 claims to be testing that put() isn't effective until after the end of the query. It does this by reading the document at the relevant URI and hoping for a failure. But it's likely that there will be a document at that location left over from previous runs, and reading it will succeed.

I would suggest rewriting this test as:

let $var := $input-context/works[1]/employee[1]
let $file := concat("temp/", current-dateTime())
return
   (
   fn:put(document { <test/> }, $file),
   insert node fn:doc($file)/* as last into $var
   )

(It's not nice to write to random file locations; but if the system under test is working to spec, the file should never get written, because the error in fn:doc() will prevent the PUL being actioned.)
Comment 1 Andrew Eisenberg 2009-02-27 20:27:05 UTC
The XML Query WG discussed this at on Feb. 24 and decided to not to make this change.

I'll add a reminder to the test suite documentation to delete any files written to the putOutput and putOutput2 source files.