!str GraphInterpreterSpecKit must not extend AkkaSpec

This commit is contained in:
Roland Kuhn 2015-11-03 18:56:46 +01:00
parent 1378fedad0
commit 12a820326d
7 changed files with 13 additions and 10 deletions

View file

@ -14,7 +14,7 @@ import akka.stream.impl.fusing.GraphInterpreter._
import org.scalactic.ConversionCheckedTripleEquals
import scala.concurrent.duration.Duration
class GraphStageLogicSpec extends GraphInterpreterSpecKit with ConversionCheckedTripleEquals {
class GraphStageLogicSpec extends AkkaSpec with GraphInterpreterSpecKit with ConversionCheckedTripleEquals {
implicit val mat = ActorMaterializer()

View file

@ -2,8 +2,9 @@ package akka.stream.impl.fusing
import akka.stream.testkit.Utils.TE
import akka.testkit.EventFilter
import akka.stream.testkit.AkkaSpec
class GraphInterpreterFailureModesSpec extends GraphInterpreterSpecKit {
class GraphInterpreterFailureModesSpec extends AkkaSpec with GraphInterpreterSpecKit {
"GraphInterpreter" must {

View file

@ -6,7 +6,7 @@ package akka.stream.impl.fusing
import akka.stream.testkit.AkkaSpec
import akka.stream.testkit.Utils._
class GraphInterpreterPortsSpec extends GraphInterpreterSpecKit {
class GraphInterpreterPortsSpec extends AkkaSpec with GraphInterpreterSpecKit {
"Port states" must {

View file

@ -8,7 +8,7 @@ import akka.stream.testkit.AkkaSpec
import akka.stream.scaladsl.{ Merge, Broadcast, Balance, Zip }
import GraphInterpreter._
class GraphInterpreterSpec extends GraphInterpreterSpecKit {
class GraphInterpreterSpec extends AkkaSpec with GraphInterpreterSpecKit {
import GraphStages._
"GraphInterpreter" must {

View file

@ -11,8 +11,9 @@ import akka.stream.stage.{ GraphStage, GraphStageLogic, InHandler, OutHandler, _
import akka.stream.testkit.AkkaSpec
import akka.stream.testkit.Utils.TE
import akka.stream.impl.fusing.GraphInterpreter.GraphAssembly
import akka.event.NoLogging
trait GraphInterpreterSpecKit extends AkkaSpec {
trait GraphInterpreterSpecKit {
abstract class Builder {
private var _interpreter: GraphInterpreter = _
@ -70,7 +71,7 @@ trait GraphInterpreterSpecKit extends AkkaSpec {
val assembly = buildAssembly()
val (inHandlers, outHandlers, logics, _) = assembly.materialize(Attributes.none)
_interpreter = new GraphInterpreter(assembly, NoMaterializer, Logging(system, classOf[TestSetup]), inHandlers, outHandlers, logics, (_, _, _) ())
_interpreter = new GraphInterpreter(assembly, NoMaterializer, NoLogging, inHandlers, outHandlers, logics, (_, _, _) ())
for ((upstream, i) upstreams.zipWithIndex) {
_interpreter.attachUpstreamBoundary(i, upstream._1)
@ -86,7 +87,7 @@ trait GraphInterpreterSpecKit extends AkkaSpec {
def manualInit(assembly: GraphAssembly): Unit = {
val (inHandlers, outHandlers, logics, _) = assembly.materialize(Attributes.none)
_interpreter = new GraphInterpreter(assembly, NoMaterializer, Logging(system, classOf[TestSetup]), inHandlers, outHandlers, logics, (_, _, _) ())
_interpreter = new GraphInterpreter(assembly, NoMaterializer, NoLogging, inHandlers, outHandlers, logics, (_, _, _) ())
}
def builder(stages: GraphStage[_ <: Shape]*): AssemblyBuilder = new AssemblyBuilder(stages)

View file

@ -11,6 +11,7 @@ import akka.stream.stage.PushPullStage
import akka.stream.stage.Stage
import akka.stream.stage.TerminationDirective
import akka.stream.stage.SyncDirective
import akka.stream.testkit.AkkaSpec
object InterpreterSupervisionSpec {
val TE = new Exception("TEST") with NoStackTrace {
@ -70,7 +71,7 @@ object InterpreterSupervisionSpec {
}
class InterpreterSupervisionSpec extends GraphInterpreterSpecKit {
class InterpreterSupervisionSpec extends AkkaSpec with GraphInterpreterSpecKit {
import InterpreterSupervisionSpec._
import Supervision.stoppingDecider
import Supervision.resumingDecider

View file

@ -9,7 +9,7 @@ import akka.stream.testkit.Utils.TE
import scala.concurrent.duration._
class LifecycleInterpreterSpec extends GraphInterpreterSpecKit {
class LifecycleInterpreterSpec extends AkkaSpec with GraphInterpreterSpecKit {
import akka.stream.Supervision._
"Interpreter" must {