Skip to content

Commit

Permalink
more fixes for timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
awicenec committed Aug 9, 2021
1 parent bc5df13 commit 4b95c1d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions daliuge-engine/test/manager/test_dim.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ def test_fullRound(self):
args = ['--port', str(restPort), '-N',hostname, '-qqq']
dimProcess = tool.start_process('dim', args)

with testutils.terminating(dimProcess, 10):
with testutils.terminating(dimProcess, timeout=10):

# Wait until the REST server becomes alive
self.assertTrue(utils.portIsOpen('localhost', restPort, 10), "REST server didn't come up in time")
self.assertTrue(utils.portIsOpen('localhost', restPort, timeout=10), "REST server didn't come up in time")

# The DIM is still empty
sessions = testutils.get(self, '/sessions', restPort)
Expand Down
2 changes: 1 addition & 1 deletion daliuge-engine/test/manager/test_mm.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def test_fullRound(self):
with testutils.terminating(mmProcess, 10):

# Wait until the REST server becomes alive
self.assertTrue(utils.portIsOpen('localhost', restPort, 10), "REST server didn't come up in time")
self.assertTrue(utils.portIsOpen('localhost', restPort, timeout=10), "REST server didn't come up in time")

# The DIM is still empty
sessions = testutils.get(self, '/sessions', restPort)
Expand Down
7 changes: 4 additions & 3 deletions daliuge-engine/test/manager/test_scalability.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,19 @@ def test_submit_hugegraph(self):
n_drops = drops_per_branch * branches * 2 + 1
graph, completed_uids = create_graph(branches=branches, drops_per_branch=drops_per_branch)
self.assertEqual(n_drops, len(graph))
self._run_graph(graph, completed_uids, 5)
self._run_graph(graph, completed_uids, timeout=5)

def _run_graph(self, graph, completed_uids, timeout):
def _run_graph(self, graph, completed_uids, timeout=5):

sessionId = 'lala'
restPort = 8888
args = ['--port', str(restPort), '-N', hostname, '-qq']

logger.debug("Starting NM on port %d" % restPort)
c = client.NodeManagerClient(port=restPort)
dimProcess = tool.start_process('dim', args)

with testutils.terminating(dimProcess, timeout):
with testutils.terminating(dimProcess, timeout=timeout):
c.create_session(sessionId)
logger.info("Appending graph")
c.append_graph(sessionId, graph)
Expand Down

0 comments on commit 4b95c1d

Please sign in to comment.