2014-04-05 03:27:18 -04:00
|
|
|
/*
|
|
|
|
* rsgxsnetservice_test.cc
|
|
|
|
*
|
|
|
|
* Created on: 11 Jul 2012
|
|
|
|
* Author: crispy
|
|
|
|
*/
|
|
|
|
|
2014-04-13 17:52:53 -04:00
|
|
|
#include <gtest/gtest.h>
|
2014-04-05 03:27:18 -04:00
|
|
|
|
2014-04-13 17:52:53 -04:00
|
|
|
#include "nxsgrpsync_test.h"
|
2014-04-26 06:07:25 -04:00
|
|
|
#include "nxsmsgsync_test.h"
|
2014-04-13 17:52:53 -04:00
|
|
|
#include "nxstesthub.h"
|
2014-05-27 17:14:05 -04:00
|
|
|
#include "nxsgrpsyncdelayed.h"
|
2014-04-05 03:27:18 -04:00
|
|
|
|
2014-04-13 17:52:53 -04:00
|
|
|
TEST(libretroshare_gxs, gxs_grp_sync)
|
2014-04-05 03:27:18 -04:00
|
|
|
{
|
2014-04-18 17:58:14 -04:00
|
|
|
rs_nxs_test::NxsTestScenario::pointer gsync_test = rs_nxs_test::NxsTestScenario::pointer(
|
|
|
|
new rs_nxs_test::NxsGrpSync());
|
2014-04-13 17:52:53 -04:00
|
|
|
rs_nxs_test::NxsTestHub tHub(gsync_test);
|
|
|
|
tHub.StartTest();
|
2014-04-18 17:58:14 -04:00
|
|
|
|
|
|
|
// wait for ten seconds
|
2014-04-26 06:07:25 -04:00
|
|
|
rs_nxs_test::NxsTestHub::Wait(10);
|
|
|
|
|
|
|
|
tHub.EndTest();
|
|
|
|
|
|
|
|
ASSERT_TRUE(tHub.testsPassed());
|
2014-05-18 12:44:19 -04:00
|
|
|
|
2014-05-27 17:14:05 -04:00
|
|
|
tHub.CleanUpTest();
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(libretroshare_gxs, gxs_grp_sync_delayed)
|
|
|
|
{
|
|
|
|
rs_nxs_test::NxsTestScenario::pointer gsync_test = rs_nxs_test::NxsTestScenario::pointer(
|
|
|
|
new rs_nxs_test::NxsGrpSyncDelayed());
|
|
|
|
rs_nxs_test::NxsTestHub tHub(gsync_test);
|
|
|
|
tHub.StartTest();
|
|
|
|
|
|
|
|
// wait for ten seconds
|
|
|
|
rs_nxs_test::NxsTestHub::Wait(20);
|
|
|
|
|
|
|
|
tHub.EndTest();
|
|
|
|
|
|
|
|
ASSERT_TRUE(tHub.testsPassed());
|
|
|
|
|
|
|
|
tHub.CleanUpTest();
|
|
|
|
|
2014-04-26 06:07:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
TEST(libretroshare_gxs, gxs_msg_sync)
|
|
|
|
{
|
|
|
|
rs_nxs_test::NxsTestScenario::pointer gsync_test = rs_nxs_test::NxsTestScenario::pointer(
|
|
|
|
new rs_nxs_test::NxsMsgSync);
|
|
|
|
rs_nxs_test::NxsTestHub tHub(gsync_test);
|
|
|
|
tHub.StartTest();
|
|
|
|
|
|
|
|
// wait for ten seconds
|
|
|
|
rs_nxs_test::NxsTestHub::Wait(10);
|
2014-04-18 17:58:14 -04:00
|
|
|
|
2014-04-13 17:52:53 -04:00
|
|
|
tHub.EndTest();
|
2014-04-05 03:27:18 -04:00
|
|
|
|
2014-04-13 17:52:53 -04:00
|
|
|
ASSERT_TRUE(tHub.testsPassed());
|
2014-05-27 17:14:05 -04:00
|
|
|
|
|
|
|
tHub.CleanUpTest();
|
2014-04-05 03:27:18 -04:00
|
|
|
}
|
2014-05-27 17:14:05 -04:00
|
|
|
|
|
|
|
TEST(libretroshare_gxs, gxs_msg_sync_delayed)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|