/*****************************************************************
 ** @author   STF 451
 ** @version  0.0.1
 ** @purpose  1:21.3.6, Any component with running can check the status of the test components
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/
module Sem_210306_running_operation_002 {

    type component GeneralComp {}

    function f1 ( ) runs on GeneralComp {
        while (true) {} // block forever
    }

    testcase TC_Sem_210306_running_operation_002() runs on GeneralComp system GeneralComp {
        var GeneralComp ptc;
        var GeneralComp ptc2;
        ptc:=GeneralComp.create;
        ptc2:=GeneralComp.create;

        ptc.start(f1());
        ptc2.start(f1());

        ptc.kill;

		// Any component running test that from two test components at least one is running or not
        if (any component.running == true) { //ptc2 running
            setverdict(pass);
        } else {
            setverdict(fail, "ptc2 should still be running");
        }
    }

    control {
        execute(TC_Sem_210306_running_operation_002(), 5.0);
    }
}