pulibrary / pdc_discovery

Princeton Data Commons discovery portal for Research Data
10 stars 0 forks source link

Runs tests in random order #710

Closed 20LM22 closed 2 weeks ago

20LM22 commented 3 weeks ago

Resolves #705 by running the tests in random order. One test regarding rollback revisions in version_footer_spec.rb had to be commented out because the expected behavior of rolled back versions is unclear and would require modifications to version_footer.rb outside the scope of this ticket.

jrgriffiniii commented 2 weeks ago

In order to reproduce this locally, one must invoke the following:

rspec './spec/requests/catalog_spec.rb[1:4:1]' --seed 64923

Further, please note that one may encounter an error similar to the following:

objc[18501]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[18501]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

I was only able to resolve this by first invoking the following:

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES