16
16
using Akka . TestKit . TestEvent ;
17
17
using Akka . Util . Internal ;
18
18
using Xunit ;
19
+ using Xunit . Abstractions ;
19
20
20
21
namespace Akka . Remote . Tests . Transport
21
22
{
@@ -163,22 +164,23 @@ private IActorRef Here
163
164
get
164
165
{
165
166
Sys . ActorSelection ( RootB / "user" / "echo" ) . Tell ( new Identify ( null ) , TestActor ) ;
166
- return ExpectMsg < ActorIdentity > ( TimeSpan . FromSeconds ( 300 ) ) . Subject ;
167
+ var subject = ExpectMsg < ActorIdentity > ( TimeSpan . FromSeconds ( 3 ) ) . Subject ;
168
+ return subject ;
167
169
}
168
170
}
169
171
170
172
171
173
#endregion
172
174
173
- public AkkaProtocolStressTest ( ) : base ( AkkaProtocolStressTestConfig )
175
+ public AkkaProtocolStressTest ( ITestOutputHelper output ) : base ( AkkaProtocolStressTestConfig , output )
174
176
{
175
177
systemB = ActorSystem . Create ( "systemB" , Sys . Settings . Config ) ;
176
178
remote = systemB . ActorOf ( Props . Create < Echo > ( ) , "echo" ) ;
177
179
}
178
180
179
181
#region Tests
180
182
181
- [ Fact ( Skip = "Extremely racy" ) ]
183
+ [ Fact ]
182
184
public void AkkaProtocolTransport_must_guarantee_at_most_once_delivery_and_message_ordering_despite_packet_loss ( )
183
185
{
184
186
//todo mute both systems for deadletters for any type of message
@@ -190,7 +192,12 @@ public void AkkaProtocolTransport_must_guarantee_at_most_once_delivery_and_messa
190
192
new FailureInjectorTransportAdapter . Drop ( 0.1 , 0.1 ) ) ) ;
191
193
AwaitCondition ( ( ) => mc . IsCompleted && mc . Result , TimeSpan . FromSeconds ( 3 ) ) ;
192
194
193
- var here = Here ;
195
+ IActorRef here = null ;
196
+ AwaitCondition ( ( ) =>
197
+ {
198
+ here = Here ;
199
+ return here != null && ! here . Equals ( ActorRefs . Nobody ) ;
200
+ } , TimeSpan . FromSeconds ( 3 ) ) ;
194
201
195
202
var tester = Sys . ActorOf ( Props . Create ( ( ) => new SequenceVerifier ( here , TestActor ) ) ) ;
196
203
tester . Tell ( "start" ) ;
0 commit comments