litestar-org/polyfactory

Bug: Test `tests/test_odmantic_factory.py::test_variable_length__dict` is flaky

sobolevn opened this issue · 5 comments

It failed for no reason for my PR.
It would be better to investigate why.

See https://github.com/litestar-org/polyfactory/actions/runs/6187286461/job/16796824602?pr=361

FAILED tests/test_odmantic_factory.py::test_variable_length__dict - AssertionError: assert 2 == 3
 +  where 2 = len({2793: UUID('79d7d6f2-770e-4fc7-850a-02f914cce894'), 3658: UUID('c01be471-6545-4407-972f-554b1e84a563')})
 +    where {2793: UUID('79d7d6f2-770e-4fc7-850a-02f914cce894'), 3658: UUID('c01be471-6545-4407-972f-554b1e84a563')} = MyModel(id=ObjectId('650320405f4433fec1b4d1ee'), items={3658: UUID('c01be471-6545-4407-972f-554b1e84a563'), 2793: UUID('79d7d6f2-770e-4fc7-850a-02f914cce894')}).items

Funding

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Yeah this is a known issue. I tried checking locally and I wasn't able to get the test to fail :/

This is resolved by https://github.com/litestar-org/polyfactory/pull/407/files#diff-a2c72fbf9b347755b4645a945b2f19cd9c14a101f1004d9c1e01d66ccfb0f0faL125

How were you able to confirm this has been resolved since it was flaky?

The test itself was removed.

The test itself was removed.

Confirmed. I'm an idiot....and I'm the one who moved it lol