Attempting to setup a test instance on another port doesn't work. ie. starting the application under 5080 and subsequently having the test framework call sip.start() as 5040 results in all communications originating from 5040, even those from the application server bound to 5080.
The reason for this is that:
1) All require() statements return the same copy of the library, and
2) The library holds references to instances of configured functions.
I propose an alternative to exports.start (perhaps exports.startMultiInstance) that will handle state per instance. @kirm if you approve of this idea I'll issue a PR when it's ready. Feedback welcome.
Attempting to setup a test instance on another port doesn't work. ie. starting the application under 5080 and subsequently having the test framework call sip.start() as 5040 results in all communications originating from 5040, even those from the application server bound to 5080.
The reason for this is that: 1) All require() statements return the same copy of the library, and 2) The library holds references to instances of configured functions.
I propose an alternative to exports.start (perhaps exports.startMultiInstance) that will handle state per instance. @kirm if you approve of this idea I'll issue a PR when it's ready. Feedback welcome.