Skip to content

Commit

Permalink
Fix the instability introduced in 3.1.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
CleanCut committed Jun 7, 2020
1 parent 7678118 commit b4d3cf3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
# Version 3.2.0
#### 6 June 2020

- Fix crashes and hangs that could occur when using >1 subprocess due to a regression introduced in 3.1.1.
- Add 'time' attributes to the `<testsuites>`, `<testsuite>`, and `<testcase>` fields in the Junit
output for the `-j/--junit-report` output. Contributed by @bkmd11 in #225. Resolves #208.

# Version 3.1.4
# Version 3.1.4 - Buggy! Please upgrade to >= 3.2.0!
#### 7 May 2020

- Fix class/module teardowns being ignored. They are now reported as errors as they should be. Resolves #223.
- Fix dates in this changelog--I was still using last year! 😆

# Version 3.1.3
# Version 3.1.3 - Buggy! Please upgrade to >= 3.2.0!
#### 5 May 2020

- Fix crash that could occur when whitespace is in the path on Windows.
Contributed by @bkmd11 in #222.

# Version 3.1.2
# Version 3.1.2 - Buggy! Please upgrade to >= 3.2.0!
#### 4 May 2020

- Fix a crash that could occur during cleanup on unusual filesystems on
Python 2. Note that Python 2 is still not supported...but might as well fix
stuff if it is easy to fix. :-) Resolves #221.

# Version 3.1.1
# Version 3.1.1 - Buggy! Please upgrade to >= 3.2.0!
#### 22 April 2020

- Fixed a hang that sometimes occurs in Python 3.8.0-3.8.2 due to a bug in upstream Python
Expand Down
22 changes: 11 additions & 11 deletions green/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ def run(suite, stream, args, testing=False):

result.startTestRun()

# The call to toParallelTargets needs to happen before pool stuff so we can crash if there
# are, for example, syntax errors in the code to be loaded.
parallel_targets = toParallelTargets(suite, args.targets)
pool = LoggingDaemonlessPool(
processes=args.processes or None,
initializer=InitializerOrFinalizer(args.initializer),
finalizer=InitializerOrFinalizer(args.finalizer),
)
manager = multiprocessing.Manager()
targets = [
(target, manager.Queue())
for target in toParallelTargets(suite, args.targets)
]
targets = [(target, manager.Queue()) for target in parallel_targets]
if targets:
pool = LoggingDaemonlessPool(
processes=args.processes or None,
initializer=InitializerOrFinalizer(args.initializer),
finalizer=InitializerOrFinalizer(args.finalizer),
)
for index, (target, queue) in enumerate(targets):
if args.run_coverage:
coverage_number = index + 1
Expand Down Expand Up @@ -150,8 +150,8 @@ def run(suite, stream, args, testing=False):
if abort:
break

pool.close()
pool.join()
pool.close()
pool.join()

result.stopTestRun()

Expand Down

0 comments on commit b4d3cf3

Please sign in to comment.