sauce sessions check
This commit is contained in:
parent
c9441b2db7
commit
cde0abd238
|
@ -6,8 +6,15 @@ import json
|
||||||
from support.appium_container import AppiumContainer
|
from support.appium_container import AppiumContainer
|
||||||
from support.test_data import TestSuiteData
|
from support.test_data import TestSuiteData
|
||||||
|
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
async def start_threads(quantity: int, func: type, returns: dict, *args):
|
async def start_threads(quantity: int, func: type, returns: dict, *args):
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
|
from tests.conftest import sauce
|
||||||
|
for _ in range(10):
|
||||||
|
if 16 - len([job for job in sauce.jobs.get_jobs() if job['status'] == 'in progress']) < quantity:
|
||||||
|
time.sleep(10)
|
||||||
for i in range(quantity):
|
for i in range(quantity):
|
||||||
returns[i] = loop.run_in_executor(None, func, *args)
|
returns[i] = loop.run_in_executor(None, func, *args)
|
||||||
for k in returns:
|
for k in returns:
|
||||||
|
|
Loading…
Reference in New Issue