airframe icon indicating copy to clipboard operation
airframe copied to clipboard

airframe-rpc: No server RPC client stub for testing

Open xerial opened this issue 3 years ago • 1 comments

Support generating RPC clients, which do not require real servers for returning responses. The user can implement a mock RPC API and can write a test without launching a server.

The data flow will be like this: RPC client -> RPC call -> serialize request object -> Call an RPC API impl -> Handle errors -> serialize response -> deserialize at RPC client

This is especially useful for Scala.js testing:

  • Mimic the server-side error handler behavior
  • Runnable on Node.js, which is used as a Scala.js test environment

xerial avatar Jan 25 '22 21:01 xerial

Deprioritizing this idea as we should use a real RPC server to avoid the overhead of mocking the real server in Scala.js.

xerial avatar May 10 '22 21:05 xerial