oldmoe / litestack

MIT License
1.02k stars 56 forks source link

LiteSearch + Parallelized Tests #121

Closed scottwater closed 1 month ago

scottwater commented 2 months ago

Is there anything that needs to be configured when using LiteSearch and running parallelized tests?

Most of the time, the first time I run my tests everything is OK (sometimes I can run sections like models or components multiple times), but eventually, I end up getting the following errors:

  1. RuntimeError: index configuration not found, either corrupted or not a litesearch index!
  2. RuntimeError: vtable constructor failed: posts_search_idx

Commenting out parallelize options in my test helper gets everything passing again. Otherwise, I need to delete (rm db/test/data.*) the test databases after reach test run.

Thanks, Scott

P.S. I tested both 0.4.4 and main at the time this message was posted.

scottwater commented 1 month ago

This appears to be fixed. I didn't notice the indexes had been added to my schema.rb #115 file. Once they were removed, everything functions as expected.