/** * Copyright - See the COPYRIGHT that is included with this distribution. * pvxs is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. */ #include #include #include #include #include #include #include #include #include namespace { using namespace pvxs; struct Tester { Value initial; server::SharedPV mbox; server::Server serv; client::Context cli; Tester() :initial(nt::NTScalar{TypeCode::Int32}.create()) ,mbox(server::SharedPV::buildReadonly()) ,serv(server::Config::localhost() .build() .addPV("mailbox", mbox)) ,cli(serv.clientConfig().build()) { testShow()<<"Server:\n"< immediate cancel() cli.info("mailbox") .result([&actual, &done](Value&& val) { actual = std::move(val); done.trigger(); }) .exec(); cli.hurryUp(); testOk1(!done.wait(2.1)); } }; } // namespace MAIN(testinfo) { testPlan(6); logger_config_env(); Tester().loopback(); Tester().lazy(); Tester().timeout(); Tester().cancel(); return testDone(); }