46 context = Base.getTestCaseContext()
48 fldRunning = context.field(
"%s.taskRunning" % (module))
49 fldFinished = context.field(
"%s.taskFinished" % (module))
51 if not (fldRunning
and fldFinished):
52 Logging.warning(
"Module %s has either no field taskFinished or no field taskRunning." % (module))
56 if not fldRunning.value:
59 Logging.info(
"Waiting for module %s to finish processing its background task." % (module))
62 fldListener = context.addFieldListener(fldFinished,
"Async.setFinished",
False)
64 mevis.MLAB.processEvents()
65 context.removeFieldListener(fldListener)