You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This morning, We encountered a strange issue when integrating this gem with our Minitest test suite. Sometimes, the OpenAPI schema was generated, sometimes not. In the end, we discovered that no schema was generated when running all tests simultaneously, but it worked fine when only running a specific controller test.
Rails offers a helper named "parallelize" to run multiple tests simultaneously. However, this only comes into effect when running a more considerable amount of tests. Single tests are still executed in one process.
My assumption right now, which explains the phenomenon explained earlier, is when Rails starts parallelizing the tests, each process has its copy of RSpec::OpenAPI.path_records. The primary process does not execute any tests, and therefore, its version of the path records remains empty, and no OpenAPI schema is generated.
Parallel test execution is a native feature of Minitest. It would be nice if RSpec OpenAPI could support it.
The text was updated successfully, but these errors were encountered:
This morning, We encountered a strange issue when integrating this gem with our Minitest test suite. Sometimes, the OpenAPI schema was generated, sometimes not. In the end, we discovered that no schema was generated when running all tests simultaneously, but it worked fine when only running a specific controller test.
Rails offers a helper named "parallelize" to run multiple tests simultaneously. However, this only comes into effect when running a more considerable amount of tests. Single tests are still executed in one process.
My assumption right now, which explains the phenomenon explained earlier, is when Rails starts parallelizing the tests, each process has its copy of
RSpec::OpenAPI.path_records
. The primary process does not execute any tests, and therefore, its version of the path records remains empty, and no OpenAPI schema is generated.Parallel test execution is a native feature of Minitest. It would be nice if RSpec OpenAPI could support it.
The text was updated successfully, but these errors were encountered: