File tree Expand file tree Collapse file tree 1 file changed +0
-38
lines changed
Tests/DistributedClusterTests Expand file tree Collapse file tree 1 file changed +0
-38
lines changed Original file line number Diff line number Diff line change @@ -166,44 +166,6 @@ final class InterceptorTests: SingleClusterSystemXCTestCase {
166166 }
167167 }
168168
169- func test_interceptor_shouldInterceptSignals( ) throws {
170- let p : ActorTestProbe < _Signals . Terminated > = self . testKit. makeTestProbe ( )
171-
172- let spyOnTerminationSignals : _Interceptor < String > = TerminatedInterceptor ( probe: p)
173-
174- let spawnSomeStoppers = _Behavior < String > . setup { context in
175- let one : _ActorRef < String > = try context. _spawnWatch (
176- " stopperOne " ,
177- . receiveMessage { _ in
178- . stop
179- }
180- )
181- one. tell ( " stop " )
182-
183- let two : _ActorRef < String > = try context. _spawnWatch (
184- " stopperTwo " ,
185- . receiveMessage { _ in
186- . stop
187- }
188- )
189- two. tell ( " stop " )
190-
191- return . same
192- }
193-
194- let _: _ActorRef < String > = try system. _spawn (
195- " theWallsHaveEarsForTermination " ,
196- . intercept( behavior: spawnSomeStoppers, with: spyOnTerminationSignals)
197- )
198-
199- // either of the two child actors can cause the death pact, depending on which one was scheduled first,
200- // so we have to check that the message we get is from one of them and afterwards we should not receive
201- // any additional messages
202- let terminated = try p. expectMessage ( )
203- ( terminated. id. name == " stopperOne " || terminated. id. name == " stopperTwo " ) . shouldBeTrue ( )
204- try p. expectNoMessage ( for: . milliseconds( 500 ) )
205- }
206-
207169 class SignalToStringInterceptor < Message: Codable > : _Interceptor < Message > {
208170 let probe : ActorTestProbe < String >
209171
You can’t perform that action at this time.
0 commit comments