Selaa lähdekoodia

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).
Thomas Waldmann 2 vuotta sitten
vanhempi
sitoutus
0ce2b55031
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      src/borg/testsuite/locking.py

+ 2 - 1
src/borg/testsuite/locking.py

@@ -181,11 +181,12 @@ 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),
+                    (host_id, process_id, thread_id),
                     RACE_TEST_DURATION,
                     thread_id,
                     lock_owner_counter,