Hono testClient
concurrency
#3784
-
I am working on test coverage for a pretty large application at the moment. In my CI the tests suites are running in parallel – around 3 at the time, all in the same worker/runner. My concern is this: how does While I haven't encountered any failing tests at the moment, I am afraid there might be a case where there's two instances of Hono running at the same time (on the same port or similar), causing the tests to fail. I could not figure this out by reading the source code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It looks like I figured this out by reading When serving the application, the adapter breaks down an incoming connection streams, and creates that This resolves my question regarding concurrency (which is unlimited), and I am pretty amazed to see such a well-put implementation. I wish we had more docs on this. |
Beta Was this translation helpful? Give feedback.
It looks like I figured this out by reading
hono-base.ts
code further. It looks like Hono can take in aRequest
object, takes it apart, and push it down the stack, which is pretty crazy.When serving the application, the adapter breaks down an incoming connection streams, and creates that
Request()
instance itself.This resolves my question regarding concurrency (which is unlimited), and I am pretty amazed to see such a well-put implementation. I wish we had more docs on this.