File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
test-complete/src/test/java/com/marklogic/client/functionaltest Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ public void testBulkXQYTransformWithTrans() throws Exception {
209209 transMgr .writeXQueryTransform ("add-attr-xquery-transform" , transformHandle , metadata );
210210 ServerTransform transform = new ServerTransform ("add-attr-xquery-transform" );
211211 transform .put ("name" , "Lang" );
212- transform .put ("value" , "English " );
212+ transform .put ("value" , "testBulkXQYTransformWithTrans " );
213213 int count =1 ;
214214 XMLDocumentManager docMgr = client .newXMLDocumentManager ();
215215 HashMap <String ,String > map = new HashMap <String ,String >();
@@ -259,10 +259,14 @@ public void testBulkXQYTransformWithTrans() throws Exception {
259259 count =0 ;
260260 DocumentPage page = docMgr .read (uris );
261261 DOMHandle dh = new DOMHandle ();
262+ // To verify that transformation did run on all docs.
263+ String verifyAttrValue = null ;
262264 while (page .hasNext ()){
263265 DocumentRecord rec = page .next ();
264266 rec .getContent (dh );
265267 assertTrue ("Element has attribure ? :" ,dh .get ().getElementsByTagName ("foo" ).item (0 ).hasAttributes ());
268+ verifyAttrValue = dh .get ().getElementsByTagName ("foo" ).item (0 ).getAttributes ().getNamedItem ("Lang" ).getNodeValue ();
269+ assertTrue ("Server Transform did not go through " ,verifyAttrValue .equalsIgnoreCase ("testBulkXQYTransformWithTrans" ));
266270 count ++;
267271 }
268272 }catch (Exception e ) {
You can’t perform that action at this time.
0 commit comments