Skip to content

Commit 468f167

Browse files
authored
[CS0618] StreamRefsSpec Sink.ActorRef<TIn>(IActorRef, object) is obsolete (#6691)
1 parent 79425f6 commit 468f167

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/core/Akka.Streams.Tests/Dsl/StreamRefsSpec.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected override bool Receive(object message)
9494
* We write out code, knowing that the other side will stream the data into it.
9595
* For them it's a Sink; for us it's a Source.
9696
*/
97-
var sink = StreamRefs.SinkRef<string>().To(Sink.ActorRef<string>(_probe, "<COMPLETE>"))
97+
var sink = StreamRefs.SinkRef<string>().To(Sink.ActorRef<string>(_probe, "<COMPLETE>", ex => new Status.Failure(ex)))
9898
.Run(_materializer);
9999
sink.PipeTo(Sender);
100100
return true;
@@ -109,7 +109,7 @@ protected override bool Receive(object message)
109109
{
110110
var sink = StreamRefs.SinkRef<string>()
111111
.WithAttributes(StreamRefAttributes.CreateSubscriptionTimeout(TimeSpan.FromMilliseconds(500)))
112-
.To(Sink.ActorRef<string>(_probe, "<COMPLETE>"))
112+
.To(Sink.ActorRef<string>(_probe, "<COMPLETE>", ex => new Status.Failure(ex)))
113113
.Run(_materializer);
114114
sink.PipeTo(Sender);
115115
return true;
@@ -242,7 +242,7 @@ public void SourceRef_must_send_messages_via_remoting()
242242
_remoteActor.Tell("give");
243243
var sourceRef = ExpectMsg<ISourceRef<string>>();
244244

245-
sourceRef.Source.RunWith(Sink.ActorRef<string>(_probe.Ref, "<COMPLETE>"), Materializer);
245+
sourceRef.Source.RunWith(Sink.ActorRef<string>(_probe.Ref, "<COMPLETE>", ex => new Status.Failure(ex)), Materializer);
246246

247247
_probe.ExpectMsg("hello");
248248
_probe.ExpectMsg("world");
@@ -255,7 +255,7 @@ public void SourceRef_must_fail_when_remote_source_failed()
255255
_remoteActor.Tell("give-fail");
256256
var sourceRef = ExpectMsg<ISourceRef<string>>();
257257

258-
sourceRef.Source.RunWith(Sink.ActorRef<string>(_probe.Ref, "<COMPLETE>"), Materializer);
258+
sourceRef.Source.RunWith(Sink.ActorRef<string>(_probe.Ref, "<COMPLETE>", ex => new Status.Failure(ex)), Materializer);
259259

260260
var f = _probe.ExpectMsg<Status.Failure>();
261261
f.Cause.Message.Should().Contain("Remote stream (");
@@ -269,7 +269,7 @@ public void SourceRef_must_complete_properly_when_remote_source_is_empty()
269269
_remoteActor.Tell("give-complete-asap");
270270
var sourceRef = ExpectMsg<ISourceRef<string>>();
271271

272-
sourceRef.Source.RunWith(Sink.ActorRef<string>(_probe.Ref, "<COMPLETE>"), Materializer);
272+
sourceRef.Source.RunWith(Sink.ActorRef<string>(_probe.Ref, "<COMPLETE>", ex => new Status.Failure(ex)), Materializer);
273273

274274
_probe.ExpectMsg("<COMPLETE>");
275275
}

0 commit comments

Comments
 (0)