fn remote_delivery_bigger_than_buffer_messages_eager_udp() {
    let mut buf_cfg = BufferConfig::default();
    buf_cfg.chunk_size(66000);
    let mut net_cfg = NetworkConfig::default();
    net_cfg.set_buffer_config(buf_cfg.clone());
    let system = system_from_network_config(net_cfg.clone());
    let remote = system_from_network_config(net_cfg);

    let (ponger_named, ponf) =
        remote.create_and_register(|| BigPongerAct::new_eager(buf_cfg.clone()));
    let poaf = remote.register_by_alias(&ponger_named, "custom_name");
    let _ = ponf.wait_expect(Duration::from_millis(1000), "Ponger failed to register!");
    let mut ponger_named_path =
        poaf.wait_expect(Duration::from_millis(1000), "Ponger failed to register!");
    ponger_named_path.via_udp();
    let (pinger_named, pinf) = system.create_and_register(move || {
        BigPingerAct::new_eager(ponger_named_path, 1500 * 3 / 4, buf_cfg)
    });

    pinf.wait_expect(Duration::from_millis(1000), "Pinger failed to register!");

    remote.start(&ponger_named);
    system.start(&pinger_named);

    // TODO maybe we could do this a bit more reliable?
    thread::sleep(Duration::from_millis(15000));

    let pingfn = system.stop_notify(&pinger_named);
    let pongfn = remote.kill_notify(ponger_named);

    pingfn
        .wait_timeout(Duration::from_millis(1000))
        .expect("Pinger never stopped!");
    pongfn
        .wait_timeout(Duration::from_millis(1000))
        .expect("Ponger never died!");
    pinger_named.on_definition(|c| {
        assert_eq!(c.count, PING_COUNT);
    });

    system
        .shutdown()
        .expect("Kompact didn't shut down properly");
}
// Sets up two KompactSystems, one with a BigPinger and one with a BigPonger.
// BigPonger will validate the BigPing messages on reception, BigPinger counts replies
Sets up two KompactSystems, one with a BigPinger and one with a BigPonger.
BigPonger will validate the BigPing messages on reception, BigPinger counts replies
Sets up two KompactSystems one with a BigPinger and one with a BigPonger . BigPonger will validate the BigPing messages on reception BigPinger counts replies
fn remote_delivery_bigger_than_buffer_messages_eager_udp() {
    let mut buf_cfg = BufferConfig::default();
    buf_cfg.chunk_size(66000);
    let mut net_cfg = NetworkConfig::default();
    net_cfg.set_buffer_config(buf_cfg.clone());
    let system = system_from_network_config(net_cfg.clone());
    let remote = system_from_network_config(net_cfg);
    let (ponger_named, ponf) =
        remote.create_and_register(|| BigPongerAct::new_eager(buf_cfg.clone()));
    let poaf = remote.register_by_alias(&ponger_named, "custom_name");
    let _ = ponf.wait_expect(Duration::from_millis(1000), "Ponger failed to register!");
    let mut ponger_named_path =
        poaf.wait_expect(Duration::from_millis(1000), "Ponger failed to register!");
    ponger_named_path.via_udp();
    let (pinger_named, pinf) = system.create_and_register(move || {
        BigPingerAct::new_eager(ponger_named_path, 1500 * 3 / 4, buf_cfg)
    });
    pinf.wait_expect(Duration::from_millis(1000), "Pinger failed to register!");
    remote.start(&ponger_named);
    system.start(&pinger_named);
    // TODO maybe we could do this a bit more reliable?
    thread::sleep(Duration::from_millis(15000));
    let pingfn = system.stop_notify(&pinger_named);
    let pongfn = remote.kill_notify(ponger_named);
    pingfn
        .wait_timeout(Duration::from_millis(1000))
        .expect("Pinger never stopped!");
    pongfn
        .wait_timeout(Duration::from_millis(1000))
        .expect("Ponger never died!");
    pinger_named.on_definition(|c| {
        assert_eq!(c.count, PING_COUNT);
    });
    system
        .shutdown()
        .expect("Kompact didn't shut down properly");
}
fn remote_delivery_bigger_than_buffer_messages_eager_udp ( ) { let mut buf_cfg = BufferConfig :: default ( ) ; buf_cfg . chunk_size ( 66000 ) ; let mut net_cfg = NetworkConfig :: default ( ) ; net_cfg . set_buffer_config ( buf_cfg . clone ( ) ) ; let system = system_from_network_config ( net_cfg . clone ( ) ) ; let remote = system_from_network_config ( net_cfg ) ; let ( ponger_named , ponf ) = remote . create_and_register ( | | BigPongerAct :: new_eager ( buf_cfg . clone ( ) ) ) ; let poaf = remote . register_by_alias ( & ponger_named , " " ) ; let _ = ponf . wait_expect ( Duration :: from_millis ( 1000 ) , " " ) ; let mut ponger_named_path = poaf . wait_expect ( Duration :: from_millis ( 1000 ) , " " ) ; ponger_named_path . via_udp ( ) ; let ( pinger_named , pinf ) = system . create_and_register ( move | | { BigPingerAct :: new_eager ( ponger_named_path , 1500 * 3 / 4 , buf_cfg ) } ) ; pinf . wait_expect ( Duration :: from_millis ( 1000 ) , " " ) ; remote . start ( & ponger_named ) ; system . start ( & pinger_named ) ; // TODO maybe we could do this a bit more reliable? thread :: sleep ( Duration :: from_millis ( 15000 ) ) ; let pingfn = system . stop_notify ( & pinger_named ) ; let pongfn = remote . kill_notify ( ponger_named ) ; pingfn . wait_timeout ( Duration :: from_millis ( 1000 ) ) . expect ( " " ) ; pongfn . wait_timeout ( Duration :: from_millis ( 1000 ) ) . expect ( " " ) ; pinger_named . on_definition ( | c | { assert_eq ! ( c count PING_COUNT ) ; } ) ; system . shutdown ( ) . expect ( " " ) ; }
Sets up two KompactSystems, one with a BigPinger and one with a BigPonger.
Sets up two KompactSystems one with a BigPinger and one with a BigPonger .