org.scalatest

trait Distributor

[source: org/scalatest/Distributor.scala]

trait Distributor
extends (Suite, Tracker) => Unit
Trait whose instances facilitate parallel execution of Suites. An optional Distributor is passed to the run method of Suite. If a Distributor is indeed passed, trait Suite's implementation of run will populate that Distributor with its nested Suites (by passing them to the Distributor's apply method) rather than executing the nested Suites directly. It is then up to another thread or process to execute those Suites.

If you have a set of nested Suites that must be executed sequentially, you can mix in trait SequentialNestedSuiteExecution, which overrides runNestedSuites and calls super's runNestedSuites implementation, passing in None for the Distributor.

Implementations of this trait must be thread safe.

Author
Bill Venners
Method Summary
override abstract def apply (suite : Suite, tracker : Tracker) : Unit
Puts a Suite into the Distributor.
Methods inherited from scala.Function2
scala.Function2.toString, scala.Function2.curry
Methods inherited from AnyRef
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
override abstract def apply(suite : Suite, tracker : Tracker) : Unit
Puts a Suite into the Distributor.
Parameters
suite - the Suite to put into the Distributor.
tracker - a Tracker to pass to the Suite's run method.
Throws
NullPointerException - if either suite or tracker is null.
Overrides
scala.Function2.scala.Function2.apply


Copyright (C) 2001-2010 Artima, Inc. All rights reserved.