mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-13 10:50:21 -04:00
fix host, pid, tid order
using "differenthost" (== not the current hostname) makes the process_alive check always return True (to play safe, because in can not check for processes on other hosts).
This commit is contained in:
parent
91104674e7
commit
16eb38e20a
1 changed files with 4 additions and 1 deletions
|
|
@ -157,8 +157,11 @@ class TestExclusiveLock:
|
|||
exception_counter = SynchronizedCounter()
|
||||
print_lock = ThreadingLock()
|
||||
thread = None
|
||||
host_id, process_id = "differenthost", 1234
|
||||
for thread_id in range(RACE_TEST_NUM_THREADS):
|
||||
thread = Thread(target=acquire_release_loop, args=(('foo', thread_id, 0), RACE_TEST_DURATION, thread_id, lock_owner_counter, exception_counter, print_lock, thread))
|
||||
thread = Thread(target=acquire_release_loop,
|
||||
args=((host_id, process_id, thread_id), RACE_TEST_DURATION, thread_id,
|
||||
lock_owner_counter, exception_counter, print_lock, thread))
|
||||
thread.start()
|
||||
thread.join() # joining the last thread
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue