Dynamoid / dynamoid

Ruby ORM for Amazon's DynamoDB.
MIT License
577 stars 197 forks source link

Dynamoid conflicts with parallel rspec tests #477

Open emmahyde opened 3 years ago

emmahyde commented 3 years ago

I have an application with two DynamoDB tables. In our integration runs, we run rspec with parallel tasks and threads. Unfortunately, we are running into an error where one class has deleted/cleared a table (using the DynamoidReset module described here as a spec helper) in one thread, and another tries to take an operation on a non-existing table. Is there a way to circumvent this besides namespacing every spec file to its own table?

andrykonchin commented 3 years ago

I have no idea how to solve this issue with current implementation of Dynamoid config. Table namespaces could help but there is only one global namespace. It could be changed but every model caches it (full table name, actually).

Dynamic configuring was asked in issues several times and I planned to implement it in the next versions.

kyto64 commented 11 months ago

Hi,

Dynamic configuring was asked in issues several times and I planned to implement it in the next versions.

Has this already been implemented?

andrykonchin commented 11 months ago

No, it hasn't been implemented yet.