Fix for time test case failure due to millisecond mismatch.
Why this change was required:
While converting second to millisecond, millisecond value
was getting lost because evaluation was done on integer value.
What is fixed:
Integer value is first converted into float value before
evaluation.
Resolves openbmc/openbmc-test-automation#1223
Change-Id: I08ea71dd4322d6e016bec30ec25f0a683313923d
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/tests/test_time.robot b/tests/test_time.robot
index 02144fe..728ce83 100644
--- a/tests/test_time.robot
+++ b/tests/test_time.robot
@@ -418,9 +418,12 @@
[Documentation] Convert epoch time to date format.
[Arguments] ${epoch_time}
# Description of argument(s):
- # epoch_time epoch time in miliseconds.
+ # epoch_time epoch time in milliseconds.
# (e.g. 1487304700000000)
+ # Convert epoch_time into floating point number.
+ ${epoch_time}= Convert To Number ${epoch_time}
+
# Convert epoch time from microseconds to seconds
${epoch_time_sec}= Evaluate ${epoch_time}/1000000