-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Been thinking about this for a couple of years now, but only really started thinking about how to solve the last week or so.
Currently we test protocol compatibility via unit tests that test every combination of protocol version against each other. The problem is that this is done using the latest code, so it's possible that changes elsewhere that the code protocol could affect protocol compatibility - we're not testing the code from the old version of Cougar.
What I propose is we build an additional all in one jar which contains a small commandline app which starts a socket transport, wires in a fake EV with a v simple Executable that provides echo capability for an RPC call that works and an RPC call that doesn't (and maybe later some v simple push capability). The jar also includes metadata on what versions of the protocol it supports. When started, it searches for a port, starts the binary protocol server on that port, echos the port to the console and waits until killed, processing any requests as they come in.
The jar would also have a client mode which expects certain data to come back from those calls based on the protocol version (i.e. all the data supported by that version).
We then build a test tool which can search a maven repo (local and central ideally) for all the test apps and then runs the full matrix of all of them. This ensures we properly test full compatibility. We should run at least as part of every release.
We could then simplify the unit tests by testing backwards compatibility with the previous version only, which would stop the already spiralling EV client test time getting out of control.