Commit 94ae4668 authored by Yann Garcia's avatar Yann Garcia
Browse files

Validate TC_VBS_MSGF_BV_16

parent 4c97a8bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -667,7 +667,7 @@ module ItsVru_TestCases {
      f_cfMtcUp01(v_vam_cluster_member, v_iut);

      // Start components
      v_vam_cluster_member.start(f_TC_VBS_MSGF_BV_16_cluster_member()); // Set the IUT in VRU-PASSIVE mode
      v_vam_cluster_member.start(f_TC_VBS_MSGF_BV_17_cluster_member()); // Set the IUT in VRU-PASSIVE mode and disband the cluster
      v_iut.start(f_TC_VBS_MSGF_BV_17_iut());

      // Synchronization
+50 −2
Original line number Diff line number Diff line
@@ -1659,6 +1659,53 @@ module ItsVru_TpFunctions {
     */
    group f_TC_VBS_MSGF_BV_17 {

      function f_TC_VBS_MSGF_BV_17_cluster_member() runs on ItsVru system ItsVruSystem {
        // Local variables
        var VAM v_fisrt_vam;
        var VAM v_cluster_vam;

        // Test control

        // Test component configuration
        f_cfUp_cluster_leader();

        // Test adapter configuration

        // Preamble
        f_selfOrClientSyncAndVerdictPreamble(c_initDone, e_success);
        // Set the IUT in VRU_PASSIVE mode
        if (f_create_cluster_iut_as_member(v_fisrt_vam, v_cluster_vam) == false) {
          f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
        } else {
          f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
        }

        // Test Body
        // Sent VAM cluster anymore to trigger clusterLeaveReason with clusterDisbandedByLeader
        for (var integer r := 0; r < PX_VRU_REPETITION; r := r + 1) {
          f_sleep(1.0);
          // TODO Update pathHistory
          v_cluster_vam.vam.vamParameters.vruClusterOperationContainer := valueof(
                                                                                  m_vru_cluster_operation_container(
                                                                                                                    -,
                                                                                                                    m_cluster_leave_info(
                                                                                                                                         v_cluster_vam.vam.vamParameters.vruClusterInformationContainer.vruClusterInformation.clusterId,
                                                                                                                                         Vru_clusterLeaveReason_clusterDisbandedByLeader
                                                                                  )));
          v_cluster_vam.vam.generationDeltaTime := f_getCurrentTime() mod 65536;
          log(v_cluster_vam);
          log("*** " & testcasename() & ": INFO: Disband the cluster ***");
          vamPort.send(m_vruReq(v_cluster_vam));
        } // End of 'for' statement
        log("*** " & testcasename() & ": PASS: IUT is in VRU_PASSIVE and the VAM cluster was disbanded ***");
        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);

        // Postamble
        f_poDefault();
        f_cfDown_cluster_leader();

      } // End of function f_TC_VBS_MSGF_BV_17_cluster_member

      function f_TC_VBS_MSGF_BV_17_iut() runs on ItsVru system ItsVruSystem {
        // Local variables

@@ -1671,8 +1718,9 @@ module ItsVru_TpFunctions {

        // Preamble
        f_prInitialState();
        // Wait for the cluster creation
        // Join the cluster
        f_utTriggerEvent(m_setVruProfile(PX_IUT_VRU_PROFILE_TYPE));
        f_selfOrClientSyncAndVerdictPreamble(c_initDone, e_success);
        // Wait for the IUT to join the cluster
        f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);

        // Test Body