polling for deletion of subscriber at teardown

Change-Id: I5344fac37e2ae09359f4db09f84d5de67107339d
diff --git a/src/test/cord-api/Framework/Subscriber.robot b/src/test/cord-api/Framework/Subscriber.robot
index 6040a67..5bf0b46 100644
--- a/src/test/cord-api/Framework/Subscriber.robot
+++ b/src/test/cord-api/Framework/Subscriber.robot
@@ -152,3 +152,11 @@
     \    ${tag}=    Get From Dictionary    ${value}    s_tag
     \    Append To List    ${tags}    ${tag}
     Run Keyword If    '${expected}' == 'True'    List Should Contain Value    ${tags}    ${stag}    ELSE    List Should Not Contain Value    ${tags}    ${stag}
+
+Validate Subscriber Count
+    [Arguments]    ${expected_no}
+    ${resp}=    CORD Get    ${VOLT_SUBSCRIBER}
+    ${jsondata}=    To Json    ${resp.content}
+    Log    ${jsondata}
+    ${length}=    Get Length    ${jsondata['items']}
+    Should Be Equal As Integers    ${length}    ${expected_no}
\ No newline at end of file
diff --git a/src/test/cord-api/Tests/WorkflowValidations/ATT_Test001.robot b/src/test/cord-api/Tests/WorkflowValidations/ATT_Test001.robot
index eb2e246..9ad9a48 100644
--- a/src/test/cord-api/Tests/WorkflowValidations/ATT_Test001.robot
+++ b/src/test/cord-api/Tests/WorkflowValidations/ATT_Test001.robot
@@ -388,6 +388,7 @@
     Wait Until Keyword Succeeds    60s    2s    Clean Up Objects    ${VOLT_SUBSCRIBER}
     Wait Until Keyword Succeeds    60s    2s    Clean Up Objects    ${ATT_WHITELIST}
     Wait Until Keyword Succeeds    60s    2s    Clean Up Objects    ${ATT_SERVICEINSTANCES}
+    Validate Subscriber Count    30s    2s    Validate Subscriber Count    0
     Sleep    10s
     Wait Until Keyword Succeeds    60s    2s    Clean Up Objects    ${VOLT_DEVICE}
     Wait Until Keyword Succeeds    120s    10s    Check Remote System Reachability    False    ${olt_ip}