When using the local or network absolute time references for the sample timestamp calculation with get_time(), the timestamps of the last data block are all equal.
How Reproduced
RocketLogger version: release-2.0.0 branch, revision 345504a70ac09e4c7c95f971248d47738fbed36d or later
Run the latest Python test cases, e.g. using test_coverage.sh. The following two test cases (introduced as part of bugfix #13) fail with:
======================================================================
FAIL: test_get_time_absolute_local_scaling (rocketlogger.tests.test_data.TestDataHandling)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./script/python/rocketlogger/tests/test_data.py", line 1161, in test_get_time_absolute_local_scaling
self.assertAlmostEqual(dtemp / dt, 1)
AssertionError: 0.8001504703443878 != 1 within 7 places (0.1998495296556122 difference)
======================================================================
FAIL: test_get_time_absolute_network_scaling (rocketlogger.tests.test_data.TestDataHandling)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./script/python/rocketlogger/tests/test_data.py", line 1171, in test_get_time_absolute_network_scaling
self.assertAlmostEqual(dtemp / dt, 1)
AssertionError: 0.8001504703443878 != 1 within 7 places (0.1998495296556122 difference)
Workaround
a) Ignore the last data block in the calculations when not working with relative timestamp, or
b) fall back to use the relative timestamps.
Description
When using the
local
ornetwork
absolute time references for the sample timestamp calculation withget_time()
, the timestamps of the last data block are all equal.How Reproduced
RocketLogger version:
release-2.0.0
branch, revision 345504a70ac09e4c7c95f971248d47738fbed36d or laterRun the latest Python test cases, e.g. using
test_coverage.sh
. The following two test cases (introduced as part of bugfix #13) fail with:Workaround
a) Ignore the last data block in the calculations when not working with relative timestamp, or b) fall back to use the
relative
timestamps.