feat(skill-interactor): handle multiple (concurrent) device ids
CoreyCole opened this issue · comments
I'm wondering how difficult it may be to simulate multiple users at once. When the SkillInteractor is instantiated, what would have to change for it to considered a different user?
Maybe alexa.launch()
should have an optional deviceId
parameter to launch the simulator with a second user? Not sure if this would be easy/possible to implement, but I'd be happy to help!
Or, is this already supported and I simply need to create a second virtual-alexa instance using VirtualAlexaBuilder()
? Trying this now
I have not tried it, but if you instantiate multiple virtual alexas, you can set different deviceIds with each. The call is:
virtualAlexa.context().device().setID(<DEVICE_ID>)
I can't think of anything that will prevent concurrency - that said - it was not built with concurrency in mind. Let me know how it goes.
Awesome, thank you for the quick response.
virtualAlexa.context().device().setID(<DEVICE_ID>)
Was exactly what I needed. Sorry to confuse, by concurrency I just meant at the same time in a single test- not programmatic async concurrency or anything fancy.