Pytest test_datetime_serialization_speed
occasionally fails
#1145
Labels
dev-process
Issues related to project management, tests, etc.
Bug Report
Description
The pytest
tests/test_blob.py::test_datetime_serialization_speed
fails non-deterministically.Reproducibility
Include:
local-docker
(docker://datajoint/mysql:8.0
)0.14.1
commit 03db252Steps to Reproduce
In a terminal window in the VSCode DevContainer on
dev-tests
branch (03db252), issuefor i in {1..10}; do pytest tests/test_blob.py::test_datetime_serialization_speed; done
to run the test 10 times. On my laptop, the test fails once out of 10 times. Since this issue seems hardware-dependent, it might be impossible to reproduce on some systems.Error Stack
Console Logs
Expected Behavior
The pytest
tests/test_blob.py::test_datetime_serialization_speed
passes every time without failing, regardless of hardware.Screenshots
N/A
Additional Research and Context
This test fails often (~10% of invocations) when it is run on my laptop (2017 ThinkPad X1 Carbon) in a DevContainer. The test fails very infrequently (~1% of invocations) when run in CI; one example is on this CI run in #1133. I suspect that a slow or busy CPU causes packing of
np.datetime64
arrays to happen unexpectedly slowly:https://github.com/ethho/datajoint-python/blob/e755b9763d950137718fb8447967ceef5172f57d/tests/test_blob.py#L218-L223
Additional Context
As of 12/18/2023, this test doesn't exist on branch
master
. This issue was discovered during development of #1142.The text was updated successfully, but these errors were encountered: