Examples of execute()


Examples of org.teavm.common.FiniteExecutor.execute()

                };
                executor = threadedExecutor;
            }
            for (final MethodReference method : testMethods) {
                final ClassHolderSource builderClassSource = classSource;
                executor.execute(new Runnable() {
                    @Override public void run() {
                        log.debug("Building test for " + method);
                        try {
                            decompileClassesForTest(classLoader, new CopyClassHolderSource(builderClassSource), method,
                                    fileNames.get(method));
View Full Code Here

Examples of org.teavm.common.SimpleFiniteExecutor.execute()

                };
                executor = threadedExecutor;
            }
            for (final MethodReference method : testMethods) {
                final ClassHolderSource builderClassSource = classSource;
                executor.execute(new Runnable() {
                    @Override public void run() {
                        log.debug("Building test for " + method);
                        try {
                            decompileClassesForTest(classLoader, new CopyClassHolderSource(builderClassSource), method,
                                    fileNames.get(method));
View Full Code Here

Examples of org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute()

      Throwable {
    Command command = helpGetCommand("update bqt1.smalla set stringkey = 1 where stringkey = 2", EXAMPLE_BQT); //$NON-NLS-1$
    AtomicRequestMessage arm = createNewAtomicRequestMessage(1, 1);
    arm.setCommand(command);
    ConnectorWorkItem synchConnectorWorkItem = new ConnectorWorkItem(arm, TestConnectorManager.getConnectorManager());
    return synchConnectorWorkItem.execute();
  }
 
  @Test public void testExecutionWarning() throws Throwable {
    AtomicResultsMessage results = helpExecuteUpdate();
    assertEquals(1, results.getWarnings().size());
View Full Code Here

Examples of org.teiid.dqp.internal.process.ThreadReuseExecutor.execute()

        final int MAX_THREADS = 5;

        final ThreadReuseExecutor pool = new ThreadReuseExecutor("test", MAX_THREADS); //$NON-NLS-1$
       
        for(int i=0; i<WORK_ITEMS; i++) {
            pool.execute(new FakeWorkItem(SINGLE_WAIT));
        }
       
        pool.shutdown();       
        pool.awaitTermination(1000, TimeUnit.MILLISECONDS);
        assertTrue(pool.isTerminated());
View Full Code Here

Examples of org.teiid.jdbc.AbstractQueryTest.execute()

        // run test
        getTransactionContainter().runTransaction(userTxn);      
       
        // now verify the results
        AbstractQueryTest test = new QueryExecution(userTxn.getSource("pm1"));
        test.execute("select * from g1 where e1 = 100");
        test.assertRowCount(1);
    }
   

    /**
 
View Full Code Here

Examples of org.teiid.query.optimizer.relational.OptimizerRule.execute()

      OptimizerRule rule = rules.pop();
      if(debug) {
        System.out.println("EXECUTING " + rule); //$NON-NLS-1$
      }
            
            plan = rule.execute(plan, metadata, FINDER, rules, new AnalysisRecord(false, debug), context);
      if(debug) {
        System.out.println("\nAFTER: \n" + plan); //$NON-NLS-1$
      }
    }
    return plan;
View Full Code Here

Examples of org.teiid.test.framework.query.QueryExecution.execute()

        // run test
        getTransactionContainter().runTransaction(userTxn);      
       
        // now verify the results
        AbstractQueryTest test = new QueryExecution(userTxn.getSource("pm1"));
        test.execute("select * from g1 where e1 = 100");
        test.assertRowCount(1);
    }
   

    /**
 
View Full Code Here

Examples of org.teiid.translator.Execution.execute()

    private List executeCommand(Command command, RuntimeMetadata runtimeMetadata, boolean close)
        throws TranslatorException {

        Execution exec = connector.createExecution(command, this.executionContext, runtimeMetadata, this.connectionFactory);
        exec.execute();
        List results = readResultsFromExecution(exec);
        if (close) {
          exec.close();
        }
        return results;
View Full Code Here

Examples of org.teiid.translator.ProcedureExecution.execute()

    FileExecutionFactory fef = new FileExecutionFactory();
    FileConnection fc = Mockito.mock(FileConnection.class);
    Mockito.stub(fc.getFile("*.txt")).toReturn(new File(UnitTestUtil.getTestDataPath(), "*.txt"));
    Call call = fef.getLanguageFactory().createCall("getTextFiles", Arrays.asList(new Argument(Direction.IN, new Literal("*.txt", TypeFacility.RUNTIME_TYPES.STRING), TypeFacility.RUNTIME_TYPES.STRING, null)), null);
    ProcedureExecution pe = fef.createProcedureExecution(call, null, null, fc);
    pe.execute();
    int count = 0;
    while (true) {
      if (pe.next() == null) {
        break;
      }
View Full Code Here

Examples of org.teiid.translator.salesforce.execution.QueryExecutionImpl.execute()

 
  @Test public void testIDCriteria() throws Exception {
    Select command = (Select)translationUtility.parseCommand("select id, name from Account where id = 'bar'"); //$NON-NLS-1$
    SalesforceConnection sfc = Mockito.mock(SalesforceConnection.class);
    QueryExecutionImpl qei = new QueryExecutionImpl(command, sfc, translationUtility.createRuntimeMetadata(), Mockito.mock(ExecutionContext.class));
    qei.execute();
    Mockito.verify(sfc).retrieve("Account.id, Account.AccountName", "Account", Arrays.asList("bar"));
  }
 
  @Test public void testDateTimeFormating() throws Exception {
    TimeZone.setDefault(TimeZone.getTimeZone("GMT-06:00"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.