updateResultAttributes(true);
updateResultAttributes(false);
    public boolean runTests() throws RemoteException, SmartFrogException {        log.info("Running junit3 test suite " + suitename);        getConfiguration();        if (configuration == null) {            throw new SmartFrogException(                    "TestSuite has not been configured yet");        }        //copy any system properties over        if (sysproperties != null) {            Utils.applySysProperties(sysproperties);        }        if (!getIf() || getUnless()) {            log("Skipping test as conditions preclude it");            return true;        }        //bind to our listener        TestListenerFactory listenerFactory = configuration.getListenerFactory();        listener = listenerFactory.listen(this,                hostname,                sfDeployedProcessName(),                suitename,                System.currentTimeMillis());        final TestListenerLog testLog = configuration.getTestLog();        if(testLog !=null) {            testLog.addLogListener(listener);        }        // set up our context        HashMap<String, Object> context = new HashMap<String, Object>();        context.put(TestContextInjector.ATTR_PRIM,this);        context.put(TestContextInjector.ATTR_LISTENER,listener);        context.put(TestContextInjector.ATTR_PROPERTIES,sysproperties);        //reset the logs        startedTests = new HashMap<String, Long>();        //now run all the tests        try {            boolean failed = false;            for(String classname :testClasses.keySet()) {                try {                    testSingleClass(classname,context);                    updateResultAttributes(false);                } catch (RemoteException e) {                    throw SmartFrogException.forward(e);                }                if (Thread.currentThread().isInterrupted()) {                    log.error("Interrupted test thread");                    failed=true;                }                updateResultAttributes(true);                failed |= !stats.isSuccessful();                if (failed && !configuration.getKeepGoing()) {                    return false;                }            }            return !failed;        } finally {            //as we exit, we mark the listener as null and end the suite.            TestListener l = getListener();            //mark the listener as null first, so that any failure to end the            //suite doesnt affect our deref            listener = null;            startedTests = null;            //unsubscribe            if (testLog != null) {                testLog.removeLogListener(l);            }            //end the suite.            l.endSuite();        }    }