Skip to content

Commit

Permalink
snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-merzky committed Apr 12, 2024
1 parent 4d5963b commit f328fbd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/radical/utils/flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,10 @@ def connect_flux(self, uri : Optional[str] = None) -> None:

with self._lock:

with ru_open(self._uid + '.dump', 'a') as fout:
fout.write('connect flux %d: %s\n' % (os.getpid(), uri))
for l in get_stacktrace():
fout.write(l + '\n')
# with ru_open(self._uid + '.dump', 'a') as fout:
# fout.write('connect flux %d: %s\n' % (os.getpid(), uri))
# for l in get_stacktrace():
# fout.write(l + '\n')

if self._uri:
raise RuntimeError('service already connected: %s' % self._uri)
Expand Down
7 changes: 5 additions & 2 deletions tests/unittests/test_heartbeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ def test_hb_uid():
# --------------------------------------------------------------------------
def proc():

start = time.time()
print('proc start: %.2f' % (time.time() - start))

hb = ru.Heartbeat('test', timeout=0.1, interval=0.01)
t0 = time.time()

Expand All @@ -112,7 +115,7 @@ def proc():
time.sleep(0.1)

while True:
time.sleep(1)
time.sleep(0.1)

finally:
if time.time() > t0 + 3.2:
Expand All @@ -129,7 +132,7 @@ def proc():
assert p.is_alive()

# but it should have a zero exit value after 2 more seconds
time.sleep(6)
time.sleep(3)
assert not p.is_alive()
assert p.exitcode

Expand Down

0 comments on commit f328fbd

Please sign in to comment.