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
|
|
|
|
2016-02-14 04:21:48 -05:00
|
|
|
// disabled, because it fails after rebase to current master (did not fail in 2015, fails in 2016)
|
|
|
|
TEST(libretroshare_gxs, DISABLED_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
|
|
|
|
2015-12-24 05:58:57 -05:00
|
|
|
// wait xx secs, because sync happens every 60sec
|
|
|
|
rs_nxs_test::NxsTestHub::Wait(1.5*60);
|
2014-04-26 06:07:25 -04:00
|
|
|
|
|
|
|
tHub.EndTest();
|
|
|
|
|
|
|
|
ASSERT_TRUE(tHub.testsPassed());
|
2014-05-18 12:44:19 -04:00
|
|
|
|
2014-05-27 17:14:05 -04:00
|
|
|
tHub.CleanUpTest();
|
|
|
|
}
|
|
|
|
|
2016-02-14 04:21:48 -05:00
|
|
|
// disabled, not implemented (does currently the same as NxsGrpSync)
|
|
|
|
TEST(libretroshare_gxs, DISABLED_gxs_grp_sync_delayed)
|
2014-05-27 17:14:05 -04:00
|
|
|
{
|
|
|
|
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();
|
|
|
|
|
2015-12-24 05:58:57 -05:00
|
|
|
// wait xx secs, because sync happens every 60sec
|
|
|
|
rs_nxs_test::NxsTestHub::Wait(2.5*60);
|
2014-05-27 17:14:05 -04:00
|
|
|
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|