You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by ti...@apache.org on 2012/07/31 05:56:27 UTC

svn commit: r1367401 - /incubator/vxquery/trunk/vxquery/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/TestRunnerFactory.java

Author: tillw
Date: Tue Jul 31 03:56:27 2012
New Revision: 1367401

URL: http://svn.apache.org/viewvc?rev=1367401&view=rev
Log:
set synamic context on the job specification

Modified:
    incubator/vxquery/trunk/vxquery/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/TestRunnerFactory.java

Modified: incubator/vxquery/trunk/vxquery/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/TestRunnerFactory.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/TestRunnerFactory.java?rev=1367401&r1=1367400&r2=1367401&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/TestRunnerFactory.java (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/TestRunnerFactory.java Tue Jul 31 03:56:27 2012
@@ -25,6 +25,9 @@ import java.util.List;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.vxquery.compiler.CompilerControlBlock;
+import org.apache.vxquery.compiler.algebricks.VXQueryGlobalDataFactory;
+import org.apache.vxquery.context.DynamicContext;
+import org.apache.vxquery.context.DynamicContextImpl;
 import org.apache.vxquery.context.RootStaticContextImpl;
 import org.apache.vxquery.context.StaticContextImpl;
 import org.apache.vxquery.xmlquery.query.XMLQueryCompiler;
@@ -112,6 +115,10 @@ public class TestRunnerFactory {
                             tempFile.getAbsolutePath()) });
                     compiler.compile(testCase.getXQueryDisplayName(), in, ccb, opts.optimizationLevel);
                     JobSpecification spec = compiler.getModule().getHyracksJobSpecification();
+
+                    DynamicContext dCtx = new DynamicContextImpl(compiler.getModule().getModuleContext());
+                    spec.setGlobalJobDataFactory(new VXQueryGlobalDataFactory(dCtx.createFactory()));
+
                     spec.setMaxReattempts(0);
                     JobId jobId = hcc.startJob("test", spec, EnumSet.of(JobFlag.PROFILE_RUNTIME));
                     hcc.waitForCompletion(jobId);