diff --git a/akka-docs/rst/java/code/docs/stream/GraphDSLDocTest.java b/akka-docs/rst/java/code/docs/stream/GraphDSLDocTest.java index 0119bf2839..6b4362c551 100644 --- a/akka-docs/rst/java/code/docs/stream/GraphDSLDocTest.java +++ b/akka-docs/rst/java/code/docs/stream/GraphDSLDocTest.java @@ -99,8 +99,8 @@ public class GraphDSLDocTest extends AbstractJavaTest { // unconnected zip.out (!) => "The inlets [] and outlets [] must correspond to the inlets [] and outlets [ZipWith2.out]" //#simple-graph org.junit.Assert.fail("expected IllegalArgumentException"); - } catch (IllegalArgumentException e) { - assertTrue(e != null && e.getMessage() != null && e.getMessage().contains("must correspond to")); + } catch (IllegalStateException e) { + assertTrue(e != null && e.getMessage() != null && e.getMessage().contains("ZipWith2.out")); } } diff --git a/akka-docs/rst/scala/code/docs/stream/GraphDSLDocSpec.scala b/akka-docs/rst/scala/code/docs/stream/GraphDSLDocSpec.scala index 74ca15cb95..b0e2ff6ad5 100644 --- a/akka-docs/rst/scala/code/docs/stream/GraphDSLDocSpec.scala +++ b/akka-docs/rst/scala/code/docs/stream/GraphDSLDocSpec.scala @@ -44,7 +44,7 @@ class GraphDSLDocSpec extends AkkaSpec { } "flow connection errors" in { - intercept[IllegalArgumentException] { + intercept[IllegalStateException] { //#simple-graph RunnableGraph.fromGraph(GraphDSL.create() { implicit builder => import GraphDSL.Implicits._