Commit 368b2766 authored by Arnaud Van der Poorten's avatar Arnaud Van der Poorten
Browse files

better follow preconditions

parent 3744a62a
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ ${notification_server_send_url}= http://${send_notification_server_host}:${s
Setup Initial Subscriptions
    ${subscription_id}=    Generate Random Entity Id    ${subscription_id_prefix}
    ${subscription_payload}=    Load Subscription Sample With Reachable Endpoint    ${subscription_payload_file_path}    ${subscription_id}    ${notification_server_send_url}
    ${subscription_payload}=    Set Entity Id In Subscription    ${subscription_payload}    ${entity_id}
    Create Subscription From Subscription Payload    ${subscription_payload}    ${CONTENT_TYPE_LD_JSON}
    Set Suite Variable    ${subscription_id}

@@ -31,8 +32,6 @@ Delete Initial Subscriptions
    Delete Subscription    ${subscription_id}

Before Test
    Setup Initial Subscriptions
    Add Initial Entity
    NotificationUtils.Start Local Server    ${notification_server_host}    ${notification_server_port}

After Test
@@ -54,9 +53,13 @@ Check that a notification is only sent if status is active
    [Documentation]     Check that a notification is only sent if and only if the status is active
    [Tags]    sub-notification    5_11_7

    Add Initial Entity
    Setup Initial Subscriptions

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

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

    Should be Equal    ${subscription_id}    ${notification}[subscriptionId]
    Should be Equal    ${entity_id}    ${notification}[data][0][id]
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ ${entity_building_filepath}= building-simple-attributes-sample.jsonld
Setup Initial Subscriptions
    ${subscription_id}=    Generate Random Entity Id    ${subscription_id_prefix}
    ${subscription_payload}=    Load Subscription Sample With Reachable Endpoint    ${subscription_payload_file_path}    ${subscription_id}    ${notification_server_send_url}
    ${subscription_payload}=    Set Entity Id In Subscription    ${subscription_payload}    ${entity_id}
    Create Subscription From Subscription Payload    ${subscription_payload}    ${CONTENT_TYPE_LD_JSON}
    Set Suite Variable    ${subscription_id}

+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ ${entity_building_filepath}= building-simple-attributes-sample.jsonld
Setup Initial Subscriptions
    ${subscription_id}=    Generate Random Entity Id    ${subscription_id_prefix}
    ${subscription_payload}=    Load Subscription Sample With Reachable Endpoint    ${subscription_payload_file_path}    ${subscription_id}    ${notification_server_send_url}
    ${subscription_payload}=    Set Entity Id In Subscription    ${subscription_payload}    ${entity_id}
    Create Subscription From Subscription Payload    ${subscription_payload}    ${CONTENT_TYPE_LD_JSON}
    Set Suite Variable    ${subscription_id}

@@ -49,6 +50,7 @@ Check that a notification is sent with all entities
    Setup Initial Subscriptions
    
    ${notification}=    Wait for notification    ${5}
    Output     ${notification}
    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
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld
Setup Initial Subscriptions
    ${subscription_id}=    Generate Random Entity Id    ${subscription_id_prefix}
    ${subscription_payload}=    Load Subscription Sample With Reachable Endpoint    ${subscription_payload_file_path}    ${subscription_id}    ${notification_server_send_url}
    ${subscription_payload}=    Set Entity Id In Subscription    ${subscription_payload}    ${entity_id}
    Create Subscription From Subscription Payload    ${subscription_payload}    ${CONTENT_TYPE_LD_JSON}
    Set Suite Variable    ${subscription_id}

@@ -47,8 +48,8 @@ Check that a notification is sent with all entities
    [Documentation]     The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and4.10) the query and geoquery conditions
    [Tags]    sub-notification    5_11_7

    Setup Initial Subscriptions
    Add Initial Entity
    Setup Initial Subscriptions
    Update Entity Attributes    ${entity_id}    ${fragment_filename}    ${CONTENT_TYPE_LD_JSON}
    
    ${notification}=    Wait for notification    ${5}
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ ${fragment_filename}= airQualityLevel-fragment.jsonld
Setup Initial Subscriptions
    ${subscription_id}=    Generate Random Entity Id    ${subscription_id_prefix}
    ${subscription_payload}=    Load Subscription Sample With Reachable Endpoint    ${subscription_payload_file_path}    ${subscription_id}    ${notification_server_send_url}
    ${subscription_payload}=    Set Entity Id In Subscription    ${subscription_payload}    ${entity_id}
    Create Subscription From Subscription Payload    ${subscription_payload}    ${CONTENT_TYPE_LD_JSON}
    Set Suite Variable    ${subscription_id}

@@ -47,8 +48,8 @@ Check that a notification is sent with all entities
    [Documentation]     The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and4.10) the query and geoquery conditions
    [Tags]    sub-notification    5_11_7

    Setup Initial Subscriptions
    Add Initial Entity
    Setup Initial Subscriptions
    Update Entity Attributes    ${entity_id}    ${fragment_filename}    ${CONTENT_TYPE_LD_JSON}
    
    ${notification}=    Wait for notification    ${5}
Loading