GitLab will be upgraded on June 23rd evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit 9598a929 authored by Olof Svensson's avatar Olof Svensson

BES-315: Fixed problem with workflow10, replaced all logger.info with logger.debug

parent 87567b55
......@@ -91,12 +91,13 @@ class AbstractActor(object):
return self.started
def setStarted(self):
logger.info("Setting finished of {0} to True".format(self.name))
logger.debug("Setting finished of {0} to True".format(self.name))
self.started = True
def hasFinished(self):
return self.finished
def setFinished(self):
logger.info("Setting finished of {0} to True".format(self.name))
logger.debug("Setting finished of {0} to True".format(self.name))
self.finished = True
......@@ -118,11 +118,8 @@ class AsyncFactory:
self.pool.apply_async(self.func, args, kwargs, self.callback)
else:
self.pool.apply_async(self.func, args, kwargs, self.callback, self.errorCallback)
logger.debug('After apply_async')
def wait(self):
self.pool.close()
self.pool.join()
logger.debug('After apply_async')
class ActorWrapper(object):
......@@ -247,4 +244,3 @@ class PythonActor(AbstractActor):
logger.debug('In trigger {0}, triggering actor {1}, inData={2}'.format(self.name, downStreamActor.name, downstreamData))
downStreamActor.trigger(downstreamData)
......@@ -55,7 +55,7 @@ class StopActor(object):
allStartedActorsFinished = True
for actorRef in listActorRef:
if actorRef.hasStarted() and not actorRef.hasFinished():
logger.info("{0}: Started {1} finished {2}".format(actorRef.name, actorRef.hasStarted(),
logger.debug("{0}: Started {1} finished {2}".format(actorRef.name, actorRef.hasStarted(),
actorRef.hasFinished()))
allStartedActorsFinished = False
if not allStartedActorsFinished:
......
......@@ -58,7 +58,7 @@ class Workflow(object):
return '/' + self.name
def addActorRef(self, actorRef):
self.logger.info("Adding actor ref: {0}".format(actorRef.name))
self.logger.debug("Adding actor ref: {0}".format(actorRef.name))
self.listActorRef.append(actorRef)
def getListActorRef(self):
......@@ -84,8 +84,8 @@ class Workflow(object):
fileHandler.setFormatter(formatter)
fileHandler.setLevel(logging.DEBUG)
logger.addHandler(fileHandler)
logger.info("")
logger.info("")
logger.info("Starting new workflow " + name)
logger.info("")
logger.debug("")
logger.debug("")
logger.debug("Starting new workflow " + name)
logger.debug("")
return logger
......@@ -88,23 +88,24 @@ class TestWorkflow10(unittest.TestCase):
outData = workflow10.run(inData)
self.assertEqual(outData['value'], limit)
def test_workflow10_300(self):
limit = 300
def test_workflow10_500(self):
limit = 500
workflow10 = Workflow10('Test workflow {0}'.format(limit))
inData = {'value': 1, 'limit': limit}
outData = workflow10.run(inData)
self.assertEqual(outData['value'], limit)
def test_workflow10_1000(self):
limit = 1000
workflow10 = Workflow10('Test workflow {0}'.format(limit))
inData = {'value': 1, 'limit': limit}
outData = workflow10.run(inData)
self.assertEqual(outData['value'], limit)
def test_workflow10_5000(self):
limit = 5000
workflow10 = Workflow10('Test workflow {0}'.format(limit))
inData = {'value': 1, 'limit': limit}
outData = workflow10.run(inData)
self.assertEqual(outData['value'], limit)
# def test_workflow10_400(self):
# limit = 400
# workflow10 = Workflow10('Test workflow {0}'.format(limit))
# inData = {'value': 1, 'limit': limit}
# outData = workflow10.run(inData)
# self.assertEqual(outData['value'], limit)
#
# def test_workflow10_500(self):
# limit = 500
# workflow10 = Workflow10('Test workflow {0}'.format(limit))
# inData = {'value': 1, 'limit': limit}
# outData = workflow10.run(inData)
# self.assertEqual(outData['value'], limit)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment