Scale Anglefish api2.test_job_lock.test_lock_queue_size is failing with FileNotFoundError: [Errno 2] No such file or directory: '/tmp/test'

Description

Here is the error of the test.

Error Message
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/test'
Stacktrace
@pytest.mark.flaky(reruns=5, reruns_delay=5)
def test_lock_queue_size():
try:
with mock("test.test1", """
from middlewared.service import job

@job(lock="test", lock_queue_size=1)
def mock(self, job, *args):
with open("/tmp/test", "a") as f:
f.write("a
n")

import time
time.sleep(5)
"""):
j1 = call("test.test1")
j2 = call("test.test1")
j3 = call("test.test1")
j4 = call("test.test1")

call("core.job_wait", j1, job=True)
call("core.job_wait", j2, job=True)
call("core.job_wait", j3, job=True)
call("core.job_wait", j4, job=True)

> with open("/tmp/test") as f:
E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/test'

api2/test_job_lock.py:103: FileNotFoundError

Problem/Justification

None

Impact

None

Activity

Show:

Bug Clerk April 6, 2022 at 5:28 PM

Bug Clerk April 6, 2022 at 5:05 PM

Complete
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Time remaining

0m

Components

Affects versions

Priority

Katalon Platform

Created April 5, 2022 at 6:48 PM
Updated July 6, 2022 at 8:58 PM
Resolved April 6, 2022 at 5:31 PM