Opened 10 years ago

Closed 9 years ago

#2338 enhancement closed fixed (fixed)

trial should handle concurrent usage in the same directory gracefully

Reported by: Jean-Paul Calderone Owned by:
Priority: high Milestone:
Component: trial Keywords:
Cc: Branch: branches/concurrent-trial_temp-2338
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun

Description

Currently a second trial process started in the same directory as a first will destroy the first's _trial_temp directory causing most or all of the remaining tests run by the first process to fail. trial should handle this case without breaking things in this manner.

Change History (10)

comment:1 Changed 10 years ago by Jonathan Lange

Priority: normallow

comment:2 Changed 9 years ago by Jean-Paul Calderone

Owner: changed from Jonathan Lange to Jean-Paul Calderone
Priority: lowhigh
Status: newassigned

comment:3 Changed 9 years ago by Jean-Paul Calderone

author: exarkun
Branch: branches/concurrent-trial_temp-2338

(In [24287]) Branching to 'concurrent-trial_temp-2338'

comment:4 Changed 9 years ago by Jean-Paul Calderone

Keywords: review added
Status: assignednew

comment:5 Changed 9 years ago by Jean-Paul Calderone

Owner: Jean-Paul Calderone deleted

comment:6 Changed 9 years ago by therve

Keywords: review removed
Owner: set to Jean-Paul Calderone

Looks good. One minor comment:

+ testdir = base + '-' + str(counter)

"%s-%s" would make that more readable.

Thanks!

comment:7 Changed 9 years ago by Jean-Paul Calderone

(In [24320]) Use interpolation instead of concatenation to create the temp dir name

refs #2338

comment:8 Changed 9 years ago by Jean-Paul Calderone

(In [24321]) avoid the repeated stringification

refs #2338

comment:9 Changed 9 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(In [24325]) Merge concurrent-trial_temp-2338

Author: exarkun Reviewer: therve Fixes: #2338

Add a lock to the _trial_temp directory so that different test processes don't try to use the same directory at the same time. If no temporary directory is specified, a different default will silently be selected if the preferred default is found to be in use. If a temporary directory is specified and found to be in use, an error will be reported.

comment:10 Changed 6 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.