123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
-
- #include "hello_test.h"
- TEST_F(HelloTest, rpcSyncGlobalCommunicator)
- {
- {
- shared_ptr<Communicator> c = getCommunicator();
- transGlobalCommunicator([&](Communicator *comm){
- checkSync(comm);
- }, c.get());
- }
- TC_Common::sleep(10);
- }
- TEST_F(HelloTest, rpcSyncGlobalCommunicatorInCoroutine)
- {
- shared_ptr<Communicator> c = getCommunicator();
- transInCoroutineGlobalCommunicator([&](Communicator *comm){
- checkSync(comm);
- }, c.get());
- }
- TEST_F(HelloTest, rpcSyncServerCommunicator)
- {
- transServerCommunicator([&](Communicator *comm){
- checkSync(comm);
- });
- }
- TEST_F(HelloTest, rpcSyncServerCommunicatorInCoroutine)
- {
- transInCoroutineServerCommunicator([&](Communicator *comm){
- checkSync(comm);
- });
- }
- TEST_F(HelloTest, rpcSyncAllocCommunicator)
- {
- transAllocCommunicator([&](Communicator *comm){
- checkSync(comm);
- });
- }
- TEST_F(HelloTest, rpcSyncAllocCommunicatorInCoroutine)
- {
- transInCoroutineAllocCommunicator([&](Communicator *comm){
- checkSync(comm);
- });
- }
- TEST_F(HelloTest, rpcSyncComplexCommunicator)
- {
- shared_ptr<Communicator> c = getCommunicator();
- transComplexCommunicator([&](Communicator *comm){
- checkSync(comm);
- }, c.get());
- transComplexCommunicator([&](Communicator *comm){
- checkSync(comm);
- }, c.get());
- transComplexCommunicator([&](Communicator *comm){
- checkSync(comm);
- }, c.get());
- transComplexCommunicator([&](Communicator *comm){
- checkSync(comm);
- }, c.get());
- }
- TEST_F(HelloTest, rpcSyncComplexCommunicatorInCoroutine)
- {
- shared_ptr<Communicator> c = getCommunicator();
- transInCoroutineComplexCommunicator([&](Communicator *comm){
- checkSync(comm);
- }, c.get());
- transInCoroutineComplexCommunicator([&](Communicator *comm){
- checkSync(comm);
- }, c.get());
- transInCoroutineComplexCommunicator([&](Communicator *comm){
- checkSync(comm);
- }, c.get());
- transInCoroutineComplexCommunicator([&](Communicator *comm){
- checkSync(comm);
- }, c.get());
- }
- TEST_F(HelloTest, rpcSyncIpV6GlobalCommunicator)
- {
- shared_ptr<Communicator> c = getCommunicator();
- transGlobalCommunicator([&](Communicator *comm){
- checkSync(comm, "Ipv6Adapter");
- }, c.get());
- }
- TEST_F(HelloTest, rpcSyncIpV6GlobalCommunicatorInCoroutine)
- {
- shared_ptr<Communicator> c = getCommunicator();
- transInCoroutineGlobalCommunicator([&](Communicator *comm){
- checkSync(comm, "Ipv6Adapter");
- }, c.get());
- }
|