Commit 5bd99444 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

fix(046_XX): misuses of context handling, add delays to ensure we get the expected notification

parent acd639f1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ Check that a notification is only sent if status is active
    [Tags]    sub-notification    5_11_7    046_01

    Add Initial Entity
    Sleep   1s
    Setup Initial Subscriptions

    Update Entity Attributes    ${entity_id}    ${fragment_filename}    ${CONTENT_TYPE_LD_JSON}
+5 −9
Original line number Diff line number Diff line
@@ -44,10 +44,11 @@ After Test

*** Test Case ***
Check that a notification is sent on the timeInterval
    [Documentation]     If a Subscription defines a timeInterval member, a Notification shall be sent periodically, when the time interval (in seconds) specified in such value field is reached, regardless of Attribute changes."
    [Documentation]     If a Subscription defines a timeInterval member, a Notification shall be sent periodically, when the time interval (in seconds) specified in such value field is reached, regardless of Attribute changes.
    [Tags]    sub-notification    5_11_7    046_02
    
    Add Initial Entity
    Sleep   1s
    Setup Initial Subscriptions

    ${notification}=    Wait for notification  timeout=${15}
@@ -60,10 +61,5 @@ Check that a notification is sent on the timeInterval
    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]
    Should be True    '${notification}[data][0][https://ngsi-ld-test-suite/context#airQualityLevel][value]'=='4.0' or '${notification}[data][0][https://ngsi-ld-test-suite/context#airQualityLevel][value]'=='4'
    Should be Equal    Eiffel Tower    ${notification}[data][0][https://ngsi-ld-test-suite/context#name][value] 




    Should be True    '${notification}[data][0][airQualityLevel][value]'=='4.0' or '${notification}[data][0][airQualityLevel][value]'=='4'
    Should be Equal    Eiffel Tower    ${notification}[data][0][name][value] 
+3 −2
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ Check that a notification is sent with all entities
    [Tags]    sub-notification    5_11_7    046_03
    
    Add Initial Entity
    Sleep   1s
    Setup Initial Subscriptions
    
    ${notification}=    Wait for notification    ${5}
@@ -55,8 +56,8 @@ Check that a notification is sent with all entities
    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]
    Should be True    '${notification}[data][0][https://ngsi-ld-test-suite/context#airQualityLevel][value]'=='4.0' or '${notification}[data][0][https://ngsi-ld-test-suite/context#airQualityLevel][value]'=='4'
    Should be Equal    Eiffel Tower    ${notification}[data][0][https://ngsi-ld-test-suite/context#name][value]
    Should be True    '${notification}[data][0][airQualityLevel][value]'=='4.0' or '${notification}[data][0][airQualityLevel][value]'=='4'
    Should be Equal    Eiffel Tower    ${notification}[data][0][name][value]


+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ Check that a notification is sent with all entities
    [Tags]    sub-notification    5_11_7    046_04

    Add Initial Entity
    Sleep   1s
    Setup Initial Subscriptions
    Update Entity Attributes    ${entity_id}    ${fragment_filename}    ${CONTENT_TYPE_LD_JSON}
    
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ Check that a notification is sent with all entities
    [Tags]    sub-notification    5_11_7    046_05

    Add Initial Entity
    Sleep   1s
    Setup Initial Subscriptions
    Update Entity Attributes    ${entity_id}    ${fragment_filename}    ${CONTENT_TYPE_LD_JSON}
    
Loading