mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

Speed up Test Execution

Open hegdeadithyak opened this issue 10 months ago • 4 comments

Description

Changed the Makefile and dependencies to use pytest-xdist

Fixes #797

Type of change

Please delete options that are not relevant.

  • [x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Please delete options that are not relevant.

  • [x] make test

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged and published in downstream modules
  • [x] I have checked my code and corrected any misspellings

Maintainer Checklist

  • [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
  • [ ] Made sure Checks passed

hegdeadithyak avatar Feb 09 '25 18:02 hegdeadithyak

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Feb 09 '25 18:02 CLAassistant

I used pytest-forked to avoid
RuntimeError: Storage folder /tmp/qdrant is already accessed by another instance of Qdra... ERROR tests/test_main.py::test_search[v1.1-True] - RuntimeError: Storage folder /tmp/qdrant is already accessed by another instance of Qdra... ERROR tests/test_main.py::test_add[v1.1-True] - RuntimeError: Storage folder /tmp/qdrant is already accessed by another instance of Qdra... ERROR tests/test_main.py::test_search[v1.0-False] - RuntimeError: Storage folder /tmp/qdrant is already accessed by another instance of Qdra... ERROR tests/test_main.py::test_get_all[v1.1-False-expected_result1] - RuntimeError: Storage folder /tmp/qdrant is already accessed by another instance of Qdra... ERROR tests/test_main.py::test_add[v1.0-False] - sqlite3.OperationalError: disk I/O error ERROR tests/test_main.py::test_get_all[v1.1-True-expected_result2] - sqlite3.OperationalError: disk I/O error ERROR tests/test_main.py::test_reset - sqlite3.OperationalError: disk I/O error ERROR tests/test_main.py::test_delete - sqlite3.OperationalError: disk I/O error but looks like pytest-forked supports image

hegdeadithyak avatar Feb 09 '25 18:02 hegdeadithyak

Thanks @hegdeadithyak. Can you please resolve conflicts?

deshraj avatar Feb 19 '25 07:02 deshraj

Hey @deshraj , since poetry.lock is a generated file, I simply reverted it to the original version from the repo. Since anyway it will be regenrated by the workflow. Is it correct way to do it, just making sure I didn't miss anything,

Thanks, K Adithya Hegde

hegdeadithyak avatar Feb 23 '25 13:02 hegdeadithyak