Commit 0fe84ba3 authored by douomo's avatar douomo
Browse files

typo fix and sleep added in Performance test

parent e16c921f
Loading
Loading
Loading
Loading
+8 −5
Original line number Original line Diff line number Diff line
@@ -37,12 +37,13 @@ Decrease TX Power
    ${t}=    Connect With Key    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["key_filename"]}
    ${t}=    Connect With Key    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["key_filename"]}
    #${t}=    Connect With Credentials    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["password"]}
    #${t}=    Connect With Credentials    ${transmitter["host"]}    ${transmitter["port"]}    ${transmitter["username"]}    ${transmitter["password"]}
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["maxTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    BuiltIn.Sleep    2s
    BuiltIn.Sleep    5s
    ${init_RSL} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    ${init_RSL} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["minTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["minTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    BuiltIn.Sleep    2s
    BuiltIn.Sleep    5s
    ${final_RSL} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    ${final_RSL} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    Log    Got RSL: ${final_RSL}    console=yes
    Log    Initial RSL value: ${init_RSL}    console=yes
    Log    Final RSL value: ${final_RSL}    console=yes
    Should Be True    ${final_RSL}<=${init_RSL}
    Should Be True    ${final_RSL}<=${init_RSL}
    Close Current Session    ${m}
    Close Current Session    ${m}
    Close Current Session    ${t}
    Close Current Session    ${t}
@@ -60,6 +61,7 @@ Check alarm
    ${init_RSL} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    ${init_RSL} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    ${resp}=    Call Method    ${m}    create_subscription    stream_name=NETCONF
    ${resp}=    Call Method    ${m}    create_subscription    stream_name=NETCONF
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["minTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["minTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    BuiltIn.Sleep    5s
    ${notif}=    Call Method    ${m}    take_notification    timeout=${TIMEOUT}
    ${notif}=    Call Method    ${m}    take_notification    timeout=${TIMEOUT}
    ${notif_type}=    Evaluate    str(type($notif))    modules=sys
    ${notif_type}=    Evaluate    str(type($notif))    modules=sys
    Log    Notification object type: ${notif_type}    console=yes
    Log    Notification object type: ${notif_type}    console=yes
@@ -92,6 +94,7 @@ Reaction to Alarm
    ${init_RSL} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    ${init_RSL} =    Get Iface Metrics    ${m}    ${par["testInterface"]}    "actual-received-level"
    ${resp}=    Call Method    ${m}    create_subscription    stream_name=NETCONF
    ${resp}=    Call Method    ${m}    create_subscription    stream_name=NETCONF
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["minTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    Set TX Power    ${t}    ${transmitter["testInterface"]}    ${transmitter["minTxPower"]}    #On transmitter node: need to connect to the TX and change ${m} with the reference to the transmitter
    BuiltIn.Sleep    5s
    ${notif}=    Call Method    ${m}    take_notification    timeout=${TIMEOUT}
    ${notif}=    Call Method    ${m}    take_notification    timeout=${TIMEOUT}
    # Safely evaluate the Python object type.
    # Safely evaluate the Python object type.
    # Using $notif (not ${notif}) avoids Robot expanding the object into an invalid string.
    # Using $notif (not ${notif}) avoids Robot expanding the object into an invalid string.