def test_distributed_lock_concurrentLockAcquisition(self):
        """Test that a second lock cannot be acquired concurrently with the first lock."""
        lock1 = get_deployment_lock(self.zookeeper_client, self.acquire_timeout)
        lock2 = get_deployment_lock(self.zookeeper_client, self.acquire_timeout)

        self.assertTrue(lock1.acquire())
        with self.assertRaises(ZookeeperLockNotAcquiredError):
            lock2.acquire()

        lock1.release()
        self.assertTrue(lock2.acquire())
        lock2.release()
        self.assertFalse(lock2.is_acquired)
        self.assertFalse(lock1.is_acquired)
Test that a second lock cannot be acquired concurrently with the first lock.
tests/integ_tests/core/distributed_lock/test_distributed_lock.py