testmodel.stopRun method hangs when run in a different bps_restpy session than the testmodel.run. The test does stop but the python API just hangs infinitely. This is pretty useful when you are automating long running tests to split the start and stop between multiple scripts.
from bps_restpy.bps import BPS
bps = BPS(host, user, password)
bps.login()
Successfully connected to x.x.x.x.
Login successful.
Welcome user.
Your session id is 5d180626-49ac-4cf3-b694-1b5b4b229fe2
bps.testmodel.run(modelname='test', group=10)
Out[6]: {'host': '127.0.0.1', 'name': 'test', 'iteration': 30, 'runid': 96}
bps.testmodel.stopRun(96)
Out[7]: b'canceled'
bps.testmodel.run(modelname='test', group=10)
Out[8]: {'host': '127.0.0.1', 'name': 'test', 'iteration': 31, 'runid': 97}
bps.logout()
Logout successful.
Bye user.
Successfully disconnected from x.x.x.x.
bps.login()
Successfully connected to x.x.x.x.
Login successful.
Welcome user.
Your session id is aee3511f-dbed-4de5-a4f1-c9f7179f920d
bps.testmodel.stopRun(97)
The last stopRun call just hangs infinitely. Above when the stopRun was done in the same session it completed with a response of b’canceled’.