public TestBarrier(TestKitBase testKit, int count, TimeSpan? defaultTimeout=null) { _testKit = testKit; _count = count; _defaultTimeout = defaultTimeout.GetValueOrDefault(testKit.TestKitSettings.DefaultTimeout); _barrier = new Barrier(count); }
public CleanupLocalSnapshots(TestKitBase testKit) { StorageLocations = new[] { "akka.persistence.snapshot-store.local.dir" }.Select(s => new DirectoryInfo(testKit.Sys.Settings.Config.GetString(s))).ToList(); }
public TestContainer(TestKitBase testKit, GlobalOptions options = null, Type replayWorkerType = null) { var query = new ProjectionStreamQuery(); Reader = testKit.CreateTestProbe(); Writer = testKit.CreateTestProbe(); options = options ?? new GlobalOptions(); var props = Even.ProjectionStream.CreateProps(query, Reader, Writer, options); ProjectionStream = testKit.Sys.ActorOf(props); }
// ReSharper disable once MemberCanBePrivate.Global - Akka needs it to be public public ProxyActor(TestKitBase testKit, ICanTell target) { IActorRef testActor = testKit.TestActor; ReceiveAny(m => { if (Sender.Equals(testActor)) target.Tell(m, Self); else testActor.Tell(m, Self); }); }
public TestSystem(TestKitBase testKit, string name, int containerCount) { _testKit = testKit; _name = name; _nullDiscovery = _testKit.ActorOf(BlackHoleActor.Props); Table = _testKit.ActorOfAsTestActorRef( () => new Table("TEST", _name, _nullDiscovery, typeof(IncrementalIntegerIdGenerator), null), _name); Containers = new List<TestActorRef<DistributedActorTableContainer<long>>>(); for (int i = 0; i < containerCount; i++) AddConstainer(); }
public UnacceptedConnectionTest(TestKitBase kit, bool pullMode = false) : base(kit) { _pullMode = pullMode; }
public StreamPuppet(IPublisher<int> p, TestKitBase kit) { _probe = TestSubscriber.CreateManualProbe<int>(kit); p.Subscribe(_probe); _subscription = _probe.ExpectSubscription(); }
public TestSetup(TestKitBase kit, bool pullMode) { _kit = kit; _pullMode = pullMode; _handler = kit.CreateTestProbe(); _handlerRef = _handler.Ref; _bindCommander = kit.CreateTestProbe(); _parent = kit.CreateTestProbe(); _selectorRouter = kit.CreateTestProbe(); _endpoint = TestUtils.TemporaryServerAddress(); _registerCallReceiver = kit.CreateTestProbe(); _interestCallReceiver = kit.CreateTestProbe(); _parentRef = new TestActorRef<ListenerParent>(kit.Sys, Props.Create(() => new ListenerParent(this, pullMode))); }
public StateObj(TestKitBase testKit) { S = ""; Finished = testKit.CreateTestBarrier(2); }
public TcpWriteProbe(TestKitBase testkit) { PublisherProbe = testkit.CreateManualPublisherProbe<ByteString>(); TcpWriteSubscription = new Lazy<StreamTestKit.PublisherProbeSubscription<ByteString>>( () => PublisherProbe.ExpectSubscription()); }
public TcpReadProbe(TestKitBase testkit) { SubscriberProbe = testkit.CreateManualSubscriberProbe<ByteString>(); TcpReadSubscription = new Lazy<ISubscription>(() => SubscriberProbe.ExpectSubscription()); }
public ServerConnection(TestKitBase testkit, IActorRef connectionActor) { _connectionActor = connectionActor; _connectionProbe = testkit.CreateTestProbe(); }
/// <summary> /// TBD /// </summary> /// <param name="testkit">TBD</param> /// <param name="actorSystem">TBD</param> /// <param name="filters">TBD</param> public EventFilterFactory(TestKitBase testkit, ActorSystem actorSystem, IReadOnlyList <EventFilterBase> filters) : this(testkit, actorSystem) { _filters = filters; }
/// <summary> /// TBD /// </summary> /// <param name="testkit">TBD</param> public EventFilterFactory(TestKitBase testkit) { _testkit = testkit; _system = _testkit.Sys; }
public LocalServerTest(TestKitBase kit) { _system = kit.Sys; UserHandler = kit.CreateTestProbe(); Selector = kit.CreateTestProbe(); RegisterCallReceiver = kit.CreateTestProbe(); InterestCallReceiver = kit.CreateTestProbe(); ChannelProbe = kit.CreateTestProbe(); }
public static Props Props(TestKitBase testKit, ICanTell target) { return Akka.Actor.Props.Create(() => new ProxyActor(testKit, target)); }
public EventFilterFactory(TestKitBase testkit, IReadOnlyList <EventFilterBase> filters) { _testkit = testkit; _filters = filters; }
public EventFilterFactory(TestKitBase testkit) { _testkit = testkit; }
public TestBarrier(TestKitBase testKit, int count) { _testKit = testKit; _count = count; _barrier = new Barrier(count); }
/// <summary> /// TBD /// </summary> /// <param name="testkit">TBD</param> /// <param name="system">TBD</param> public EventFilterFactory(TestKitBase testkit, ActorSystem system) { _testkit = testkit; _system = system; }
public EstablishedConnectionTest(TestKitBase kit, bool keepOpenOnPeerClosed = false, bool useResumeWriting = true, bool pullMode = false) : base(kit, pullMode) { _kit = kit; KeepOpenOnPeerClosed = keepOpenOnPeerClosed; UseResumeWriting = useResumeWriting; PullMode = pullMode; }
public Server(TestKitBase testkit, EndPoint address = null) { _testkit = testkit; Address = address ?? TestUtils.TemporaryServerAddress(); ServerProbe = testkit.CreateTestProbe(); ServerRef = testkit.ActorOf(TestServerProps(Address, ServerProbe.Ref)); ServerProbe.ExpectMsg<Tcp.Bound>(); }