I have simple test on AVC in python, that unlock device and launch application. This test runs in the infinity loop and it runs normally, but after some time (hour or two) I got an errors 'Alarm clock' and 'ERROR: timed out'. It looks like:
start: 1401863215000
ERROR: timed out
sleep
Alarm clock
parser: 1401863215000
where start, sleep and parser messages is my prints:
print ("start: " + start)
os.system('python satest.py > _LOGS/launch_log' + start + '.txt')
print ("sleep")
time.sleep(5)
print ("parser: " + start)
os.system('python parser.py')
Can someone suggest where an error could be? additional info is on github
here is one of my methods:
def verify_view(view, delay, it):
start = datetime.datetime.now()
s = 0
for counter in range(1,it):
vc = ViewClient(*ViewClient.connectToDeviceOrExit())
view_object = vc.findViewWithText(view)
if (view_object is None):
print("VERIFY: view - " + view + " not found")
s = 2
time.sleep(delay)
else:
print("VERIFY: view - " + view + " exists")
s = 1
break
stop = datetime.datetime.now()
global rest
rest = stop - start
print("VERIFY: verification time is: " + str(rest) + " seconds")
if (s == 0):
print("VERIFY: TEST ERROR, debug param 's' == " + str(s))
return False
if (s == 1):
print("VERIFY: verification finished successfully, text - '" + view + "' was found")
return True
else:
print("VERIFY: verification failed, there are no text - '" + view + "'")
return False