Improve handler switching in test suite
Currently, instantiating multiple portals in a single unit tests causes the handler API to be shared between the two portals. There is an attempt to isolate them using the register/switch methods in test-lib, but this is not enough in some cases (such as accessing HANDLER->tsv
, see 00-Switch.t)
In this MR, I extend the register/switch system to also switch all SharedVariables (tsv, portal, logger, etc). Which will let us better isolate the handler API in unit tests.
@guimard what do you think? Is there some other part of the handler that needs to be isolated?