correct-pm-data-expected-number-of-metrics

Change-Id: I24cb544ab137154e93ab4c87d0f99dbeb2b1e67d
diff --git a/libraries/pm_utilities.robot b/libraries/pm_utilities.robot
index f54c693..f4723c7 100755
--- a/libraries/pm_utilities.robot
+++ b/libraries/pm_utilities.robot
@@ -25,6 +25,8 @@
 Library           utility.py    WITH NAME    utility
 Resource          ./voltctl.robot
 
+Library           grpc_robot.VolthaTools     WITH NAME    volthatools
+
 *** Variables ***
 # operators for value validations, needed for a better reading only
 ${gt}      >      # greater than
@@ -215,7 +217,7 @@
     [Documentation]    Delivers collection interval over all devices
     [Arguments]    ${user}=False
     ${longest_interval}=    Get Longest Interval    user=${user}
-    ${collect_interval}=    evaluate    ((${longest_interval}*2)+(${longest_interval}*0.2))+5
+    ${collect_interval}=    evaluate    (${longest_interval}*2)+6
     ${collect_interval}=    Validate Time Unit    ${collect_interval}
     [return]    ${collect_interval}
 
@@ -618,8 +620,8 @@
         # remove time unit if available
         ${collect_interval}=    Validate Time Unit    ${collect_interval}    False
         ${expected_checks}=    evaluate    ${collect_interval}/${val}
-        # remove float format (Validate Time Unit will this done:-))
-        ${expected_checks}=    Validate Time Unit    ${expected_checks}    False
+        # remove float format and round down always (e.g. 3.9 -> 3)
+        ${expected_checks}=    evaluate    int(${expected_checks})
         Run Keyword And Continue On Failure    Run Keyword Unless    ${expected_checks} <= ${checks}    FAIL
         ...    Wrong number of pm-data (${checks}) for ${group} of device ${device_id}!
     END
diff --git a/tests/pm-data/Voltha_ONUPMTests.robot b/tests/pm-data/Voltha_ONUPMTests.robot
index 9667745..4346925 100755
--- a/tests/pm-data/Voltha_ONUPMTests.robot
+++ b/tests/pm-data/Voltha_ONUPMTests.robot
@@ -42,7 +42,6 @@
 Resource          ../../variables/variables.robot
 
 Library           kafka_robot.KafkaClient    log_level=DEBUG    WITH NAME    kafka
-Library           grpc_robot.VolthaTools     WITH NAME    volthatools
 
 
 *** Variables ***