object TestContext
- Source
- TestContext.scala
- Alphabetic
- By Inheritance
- TestContext
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final class ConcurrentState extends AnyRef
- final case class State(lastID: Long, clock: FiniteDuration, tasks: SortedSet[Task], lastReportedFailure: Option[Throwable]) extends Product with Serializable
Used internally by TestContext, represents the internal state used for task scheduling and execution.
- final case class Task(id: Long, task: Runnable, runsAt: FiniteDuration, rnd: Long) extends Product with Serializable
Used internally by TestContext, represents a unit of work pending execution.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(seed: String): TestContext
Constructs a new TestContext using the given seed, which must be encoded as base64.
Constructs a new TestContext using the given seed, which must be encoded as base64. Assuming this seed was produced by another
TestContext
, running the same program against the new context will result in the exact same task interleaving as happened in the previous context, provided that the same tasks are interleaved. Note that subtle differences between different runs of identical programs are possible, particularly if one program auto-cede
s in a different place than the other one. This is an excellent and reliable mechanism for small, tightly-controlled programs with entirely deterministic side-effects, and a completely useless mechanism for anything where the scheduler ticks see different task lists despite identical configuration. - def apply(): TestContext
Builder for TestContext instances.
Builder for TestContext instances. Utilizes a random seed, which may be obtained from the TestContext#seed method.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()