Skip to content

Problems with ODM, presumably with ResetDatabase #1124

Description

@vkost

Hi,

I'm experiencing occasional issues with my tests. Here's the error message:

RuntimeException: Error running "doctrine:mongodb:schema:create --dm=default": 1: Operation not permitted

It always happen on a random test, so unfortunately I'm not able to create code to replicate the problem.

Most of my tests use ResetDatabase trait. I have a feeling this is connected. My guess is that I'm getting this error randomly when ResetDatabase trait attempts to create a new blank database for the test about to be run. However, I don't see why this would happen, because the same operation is executed over 300 times before that successfully.

I am running MongoDB in a docker container, if that matters. The version is 7, but until recently I've been using MongoDB 4 and I've experienced the same issues.

Symfony is 7.4.13, Foundry is 2.10.1, PHP is 8.5.7. Everything runs in MacOS 26.5.1, with Docker Desktop 4.74.0. The tests are also run in a container.

I'd appreciate it if you could point me in the right direction - I'd be happy to dig more and fix the problem on my end.

Thank you
Vic

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions