Skip to content

Commit 3c33a0c

Browse files
committed
Replace sleep with file check
1 parent f131674 commit 3c33a0c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

osgtest/tests/test_29_slurm.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
CLUSTER_NAME = 'osg_test'
1010
CTLD_LOG = '/var/log/slurm/slurmctld.log'
11+
SLURM_LOG = '/var/log/slurm/slurm.log'
1112
SHORT_HOSTNAME = core.get_hostname().split('.')[0]
1213

1314
SLURMDBD_CONFIG = """AuthType=auth/munge
@@ -139,7 +140,11 @@ def test_03_start_slurm(self):
139140
stat,
140141
'slurm_rpc_node_registration complete for %s' % SHORT_HOSTNAME,
141142
60.0)
142-
time.sleep(10)
143+
log_stat = core.get_stat(SLURM_LOG)
144+
core.monitor_file(SLURM_LOG,
145+
log_stat,
146+
'slurmd started',
147+
60.0)
143148
command = ['scontrol', 'update', 'nodename=%s' % SHORT_HOSTNAME, 'state=idle']
144149
core.check_system(command, 'enable slurm node')
145150

0 commit comments

Comments
 (0)