Examples of attachWorkerThreadContext()


Examples of net.grinder.engine.process.JUnitThreadContextInitializer.attachWorkerThreadContext()

    // for test, used to get groovy source file.
    String file = getClass().getClassLoader().getResource("org/ngrinder/TestRunner.groovy").getFile();
    GroovyScriptEngine engine = new GroovyScriptEngine(new ScriptLocation(new File(file).getAbsoluteFile()));

    init.attachWorkerThreadContext();
    GroovyScriptEngine.GroovyWorkerRunnable worker = (GroovyScriptEngine.GroovyWorkerRunnable) engine
        .createWorkerRunnable();
    assertStaticField(engine.m_groovyClass, "callCount1", 0);
    assertStaticField(engine.m_groovyClass, "callCount2", 0);
    worker.run();
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.