Current Situation
Currently, we run tests which rely on the browser using a synchronously executing web driver from Selenium. As a result, server implementations have been required to provide a run_in_thread method such that they can be run in the background while the blocking test code is allowed to proceed.
Unfortunately, some async servers don't play well with threads. This is primarily due to the fact that cleanly stopping a thread can be somewhat challenging. For example, IDOM is currently locked into version sanic<19.12 because later releases have been developed without consideration for threading.
Proposed Actions
As a result, we should switch to an async web driver like arsenic or pyppeteer and add a ServerType.run_async method to the various server implementations. Once this is done we can deprecate the ServerType.run_in_thread method.
Then lastly, we can upgrade Sanic to the latest version.
Work Items
Current Situation
Currently, we run tests which rely on the browser using a synchronously executing web driver from Selenium. As a result, server implementations have been required to provide a
run_in_threadmethod such that they can be run in the background while the blocking test code is allowed to proceed.Unfortunately, some async servers don't play well with threads. This is primarily due to the fact that cleanly stopping a thread can be somewhat challenging. For example, IDOM is currently locked into version
sanic<19.12because later releases have been developed without consideration for threading.Proposed Actions
As a result, we should switch to an async web driver like arsenic or pyppeteer and add a
ServerType.run_asyncmethod to the various server implementations. Once this is done we can deprecate theServerType.run_in_threadmethod.Then lastly, we can upgrade Sanic to the latest version.
Work Items
ServerType.run_asyncand switch to async web driverServerType.run_in_threadas deprecatedsanicand raise whenrun_in_threadis called forsanic>=19.12ServerType.run_in_thread