/*
 * ################################################################
 *
 * ProActive Parallel Suite(TM): The Java(TM) library for
 *    Parallel, Distributed, Multi-Core Computing for
 *    Enterprise Grids & Clouds
 *
 * Copyright (C) 1997-2011 INRIA/University of
 *                 Nice-Sophia Antipolis/ActiveEon
 * Contact: proactive@ow2.org or contact@activeeon.com
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Affero General Public License
 * as published by the Free Software Foundation; version 3 of
 * the License.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA
 *
 * If needed, contact us to obtain a release under GPL Version 2 or 3
 * or a different license than the AGPL.
 *
 *  Initial developer(s):               The ProActive Team
 *                        http://proactive.inria.fr/team_members.htm
 *  Contributor(s):
 *
 * ################################################################
 * $$PROACTIVE_INITIAL_DEV$$
 */
package functionaltests.utils;

import org.ow2.proactive.scheduler.common.exception.NotConnectedException;
import org.ow2.tests.ProActiveTest;
import org.apache.log4j.Logger;
import org.junit.After;
import org.junit.Before;


/**
 * 
 * The parent class for all consecutive functional tests.
 *
 */
public class SchedulerFunctionalTest extends ProActiveTest {

    protected static final Logger logger = Logger.getLogger("SchedulerTests");

    protected SchedulerTHelper schedulerHelper;

    @Before
    public void startSchedulerIfNeeded() throws Exception {
        schedulerHelper = new SchedulerTHelper();
    }

    @After
    public void killAllProcessesIfNeeded() throws Exception {
        try {
            schedulerHelper.disconnect(); // in case user has changed during test
            schedulerHelper.removeExtraNodes();
        } catch (Throwable ignored) {
            // ns extra not found
        }

        try {
            schedulerHelper.disconnect();
        } catch (NotConnectedException alreadyDisconnected) {

        }
    }
}

@@ -1461,16 +1461,127 @@
 utils;%0A%0A
+import java.util.concurrent.TimeUnit;%0A%0Aimport org.objectweb.proactive.core.config.CentralPAPropertyRepository;%0A
 import o
@@ -1647,16 +1647,16 @@
 eption;%0A
-
 import o
@@ -1764,16 +1764,71 @@
 Before;%0A
+import org.junit.Rule;%0Aimport org.junit.rules.Timeout;%0A
 %0A%0A/**%0A *
@@ -2036,16 +2036,16 @@
 sts%22);%0A%0A
-
     prot
@@ -2085,16 +2085,158 @@
 elper;%0A%0A
+    @Rule%0A    public Timeout testTimeout = new Timeout(CentralPAPropertyRepository.PA_TEST_TIMEOUT.getValue(),%0A      TimeUnit.MILLISECONDS);%0A%0A
     @Bef

Put back timeout in scheduler functional tests