System.err.println("Starting " + testCase.getXQueryDisplayName());
}
long start = System.currentTimeMillis();
try {
try {
XMLQueryCompiler compiler = new XMLQueryCompiler(null);
File tempFile = File.createTempFile(testCase.getXQueryFile().getName(), ".tmp");
tempFile.deleteOnExit();
Reader in = new InputStreamReader(new FileInputStream(testCase.getXQueryFile()), "UTF-8");
CompilerControlBlock ccb = new CompilerControlBlock(new StaticContextImpl(
RootStaticContextImpl.INSTANCE), new FileSplit[] { new FileSplit("nc1",
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);