diff options
author | JvD_Ericsson <jeff.van.dam@est.tech> | 2024-01-22 13:32:34 +0000 |
---|---|---|
committer | JvD_Ericsson <jeff.van.dam@est.tech> | 2024-01-23 11:23:54 +0000 |
commit | 820235ce87137a15364d61276617d10844e3c35f (patch) | |
tree | 6aecf636512f5bf439df0e57384402f053908a66 /csit/tests/cps-trust-level | |
parent | 5ee1836bd9a2336afad291623db5b265f27d801a (diff) |
Add retry mechanism instead of sleep
- replaced sleeps with retry mechanism
- removed unnecessary sleeps before polling
- changed formatting
Issue-ID: CPS-1093
Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
Change-Id: I7e26570eeedea09fd36f9c9bce87c4cd45906aa9
Diffstat (limited to 'csit/tests/cps-trust-level')
-rw-r--r-- | csit/tests/cps-trust-level/cps-trust-level.robot | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/csit/tests/cps-trust-level/cps-trust-level.robot b/csit/tests/cps-trust-level/cps-trust-level.robot index 70659000cf..e4deeff32b 100644 --- a/csit/tests/cps-trust-level/cps-trust-level.robot +++ b/csit/tests/cps-trust-level/cps-trust-level.robot @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2023 Nordix Foundation + * Copyright (C) 2023-2024 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,14 +44,13 @@ Register data node ${headers}= Create Dictionary Content-Type=application/json Authorization=${auth} ${response}= POST On Session CPS_URL ${uri} headers=${headers} data=${jsonCreateCmHandles} Should Be Equal As Strings ${response.status_code} 200 - Sleep 5 Verify notification ${group_id}= Create Consumer auto_offset_reset=earliest - Subscribe Topic topics=cm-events group_id=${group_id} - ${result}= Poll group_id=${group_id} only_value=False poll_attempts=5 - ${headers} Set Variable ${result[0].headers()} - ${payload} Set Variable ${result[0].value()} + Subscribe Topic topics=cm-events group_id=${group_id} + ${result}= Poll group_id=${group_id} only_value=False poll_attempts=5 + ${headers} Set Variable ${result[0].headers()} + ${payload} Set Variable ${result[0].value()} FOR ${header_key_value_pair} IN @{headers} Compare Header Values ${header_key_value_pair[0]} ${header_key_value_pair[1]} "ce_specversion" "1.0" Compare Header Values ${header_key_value_pair[0]} ${header_key_value_pair[1]} "ce_source" "NCMP" |