can I run 2 `it` blocks concurrently with testbox?
# box-products
d
can I run 2
it
blocks concurrently with testbox?
b
@David Rogers TestBox supports an async mode that does this, but beware there be dragons
It basically won't work for integration testes since they are all sharing the same mocked coldbox in the application scope
d
yes but be the dragons unslayable says I?
b
And it will only work for unit tests that are truly written to be 100% stand alone
Depends on your tests
d
ah yes for integration, talking with a db, doing coldbox requests
b
Just running a ColdBox event, etc. Anything that extends the coldbox base test case is an "integration test"
d
i seemed to have success doing two separate http requests to 2 different spec files at the same time, which vaguley makes sense in my mental model of how it works
b
That sounds different. Are you now talking about hitting the Testbox runner.cfm by two requests at the same time?
d
that is a fallback approach I'm looking at if running `it`s cannot be done concurrently in the same request
b
I'm not sure why you're still talking like you don't know the answer when I said it was possible above 🤔
d
ah I see now, the shared coldbox instance is the pain point;
asyncAll=true
seems to take a lock on it (or something) (just observing didn't read the code) so there's no perf gain for integration tests, is that about right?
b
No clue, I haven't tried async tests in years and I don't think I ever tried them for integration tests
I don't know if there's any locks around it-- you'd have to check out the code
👍 1