ensure that graph attributes are not lost

- this entails making Module.isSealed==true if attributes are set
- also removed Module.nest(), which implied fixing replaceShape to form
  a CompositeModule where CopiedModule was used before (GraphModule and
  TlsModule)
This commit is contained in:
Roland Kuhn 2016-02-12 08:28:16 +01:00
parent 4e49d75ad8
commit 7b7647435b
18 changed files with 87 additions and 97 deletions

View file

@ -13,6 +13,7 @@ import scala.util.control.NoStackTrace
import akka.stream._
import akka.stream.testkit._
import akka.NotUsed
import akka.testkit.EventFilter
class SourceSpec extends AkkaSpec with DefaultTimeout with ScalaFutures {
@ -235,13 +236,14 @@ class SourceSpec extends AkkaSpec with DefaultTimeout with ScalaFutures {
"terminate with a failure if there is an exception thrown" in {
val t = new RuntimeException("expected")
whenReady(
Source.unfold((0, 1)) {
case (a, _) if a > 10000000 throw t
case (a, b) Some((b, a + b) a)
}.runFold(List.empty[Int]) { case (xs, x) x :: xs }.failed) {
_ should be theSameInstanceAs (t)
}
EventFilter[RuntimeException](message = "expected", occurrences = 1) intercept
whenReady(
Source.unfold((0, 1)) {
case (a, _) if a > 10000000 throw t
case (a, b) Some((b, a + b) a)
}.runFold(List.empty[Int]) { case (xs, x) x :: xs }.failed) {
_ should be theSameInstanceAs (t)
}
}
"generate a finite fibonacci sequence asynchronously" in {