!str GraphInterpreterSpecKit must not extend AkkaSpec
This commit is contained in:
parent
1378fedad0
commit
12a820326d
7 changed files with 13 additions and 10 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue