Opened 8 years ago

Closed 6 years ago

#2338 enhancement closed fixed (fixed)

trial should handle concurrent usage in the same directory gracefully

Reported by: exarkun Owned by:
Priority: high Milestone:
Component: trial Keywords:
Cc: Branch: branches/concurrent-trial_temp-2338
(diff, github, buildbot, log)
Author: exarkun Launchpad Bug:

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 8 years ago by jml

  • Priority changed from normal to low

comment:2 Changed 6 years ago by exarkun

  • Owner changed from jml to exarkun
  • Priority changed from low to high
  • Status changed from new to assigned

comment:3 Changed 6 years ago by exarkun

  • author set to exarkun
  • Branch set to branches/concurrent-trial_temp-2338

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

comment:4 Changed 6 years ago by exarkun

  • Keywords review added
  • Status changed from assigned to new

comment:5 Changed 6 years ago by exarkun

  • Owner exarkun deleted

comment:6 Changed 6 years ago by therve

  • Keywords review removed
  • Owner set to exarkun

Looks good. One minor comment:

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

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

Thanks!

comment:7 Changed 6 years ago by exarkun

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

refs #2338

comment:8 Changed 6 years ago by exarkun

(In [24321]) avoid the repeated stringification

refs #2338

comment:9 Changed 6 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

(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 4 years ago by <automation>

  • Owner exarkun deleted
Note: See TracTickets for help on using tickets.