Commit f7532fb0 authored by Ranim Naimi's avatar Ranim Naimi
Browse files

check that no notification is sent if the throttling member defined in the...

check that no notification is sent if the throttling member defined in the subscription has not elapsed yet
parent 593df5f9
Loading
Loading
Loading
Loading
+7 −12
Changes for TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_15.robot: 7 added lines, 12 removed lines.
Original line number Diff line number Diff line
*** Settings ***
Documentation       If a Subscription defines a throttling member, a Notification shall be sent after the throttling specified (in seconds) has elapsed.
Documentation       If a Subscription defines a throttling member, a Notification shall not be sent if the throttling specified (in seconds) has not elapsed yet.

Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource
Resource            ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
@@ -21,23 +21,18 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld


*** Test Cases ***
046_15_01 Check that a notification is sent after the throttling has elapsed
    [Documentation]    If a Subscription defines a throttling member, a Notification shall be sent after the throttling specified (in seconds) has elapsed.
    [Tags]    sub-notification    5_8_6    046_15
046_15_01 Check that a notification is not sent if the throttling has not elapsed yet
    [Documentation]    If a Subscription defines a throttling member, a Notification shall not be sent if the throttling specified (in seconds) has not elapsed yet.
    [Tags]    sub-notification    5_8_6    046_16
    Setup Initial Subscriptions

    ${response}=    Update Entity Attributes    ${entity_id}    ${fragment_filename}    ${CONTENT_TYPE_LD_JSON}

    ${notification}    ${headers}=    Wait for notification    timeout=${15}
    Sleep    2
    ${response}=    Update Entity Attributes    ${entity_id}    ${fragment_filename}    ${CONTENT_TYPE_LD_JSON}

    ${notification}    ${headers}=    Wait for notification    timeout=${10}

    Should be Equal    ${subscription_id}    ${notification}[subscriptionId]
    Dictionary Should Contain Key    ${notification}    data
    Should Not Be Empty    ${notification}[data]    Notification data should not be empty
    Should be Equal    ${entity_id}    ${notification}[data][0][id]
    ${response}=    Update Entity Attributes    ${entity_id}    ${fragment_filename}    ${CONTENT_TYPE_LD_JSON}

    Wait for no notification


*** Keywords ***
−67

File deleted.

−17

File deleted.

−18

File deleted.