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
4 files changed