adding new test for stats feature

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7460 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2014-07-19 21:26:45 +00:00
parent a29f382175
commit be20086e09
6 changed files with 78 additions and 0 deletions

View File

@ -17,6 +17,16 @@ GenExchangeTest::~GenExchangeTest()
{ {
} }
bool GenExchangeTest::getServiceStatistic(const uint32_t &token, GxsServiceStatistic &servStatistic)
{
mTestService->getServiceStatisticTS(token, servStatistic);
}
bool GenExchangeTest::getGroupStatistic(const uint32_t &token, GxsGroupStatistic &grpStatistic)
{
mTestService->getGroupStatisticTS(token, grpStatistic);
}
void GenExchangeTest::pollForToken(uint32_t token, const RsTokReqOptions &opts, bool fill) void GenExchangeTest::pollForToken(uint32_t token, const RsTokReqOptions &opts, bool fill)
{ {

View File

@ -52,6 +52,9 @@ public:
protected: protected:
bool getServiceStatistic(const uint32_t &token, GxsServiceStatistic &servStatistic);
bool getGroupStatistic(const uint32_t &token, GxsGroupStatistic &grpStatistic);
/*! /*!
* After each request and publish operation this should * After each request and publish operation this should
* be called to ensure the operation has completed * be called to ensure the operation has completed

View File

@ -59,6 +59,16 @@ bool GenExchangeTestService::getMsgRelatedDataTS(const uint32_t &token, GxsMsgRe
return getMsgRelatedData(token, msgItems); return getMsgRelatedData(token, msgItems);
} }
bool GenExchangeTestService::getGroupStatisticTS(const uint32_t &token, GxsGroupStatistic &stats)
{
return getGroupStatistic(token, stats);
}
bool GenExchangeTestService::getServiceStatisticTS(const uint32_t &token, GxsServiceStatistic &stats)
{
return getServiceStatistic(token, stats);
}
bool GenExchangeTestService::getMsgMetaTS(const uint32_t &token, GxsMsgMetaMap &msgInfo) bool GenExchangeTestService::getMsgMetaTS(const uint32_t &token, GxsMsgMetaMap &msgInfo)
{ {
return getMsgMeta(token, msgInfo); return getMsgMeta(token, msgInfo);

View File

@ -81,6 +81,16 @@ public:
*/ */
bool getMsgRelatedDataTS(const uint32_t &token, GxsMsgRelatedDataMap& msgItems); bool getMsgRelatedDataTS(const uint32_t &token, GxsMsgRelatedDataMap& msgItems);
/*!
*
*
*
*/
bool getGroupStatisticTS(const uint32_t &token, GxsGroupStatistic &stats);
bool getServiceStatisticTS(const uint32_t &token, GxsServiceStatistic &stats);
void setGroupSubscribeFlagTS(uint32_t& token, const RsGxsGroupId& grpId, const uint32_t& status, const uint32_t& mask); void setGroupSubscribeFlagTS(uint32_t& token, const RsGxsGroupId& grpId, const uint32_t& status, const uint32_t& mask);

View File

@ -0,0 +1,25 @@
#include "gxsteststats.h"
#define POLLING_TIME_OUT 5
GxsTestStats::GxsTestStats(GenExchangeTestService *const testService, RsGeneralDataService *dataService)
: GenExchangeTest(testService, dataService, POLLING_TIME_OUT){
}
GxsTestStats::~GxsTestStats()
{
}
void GxsTestStats::runTests()
{
testGroupStatistics();
}
void GxsTestStats::testGroupStatistics()
{
}
void GxsTestStats::testServiceStatistics()
{
}

View File

@ -0,0 +1,20 @@
#ifndef GXSTESTSTATS_H
#define GXSTESTSTATS_H
#include "genexchangetester.h"
class GxsTestStats : public GenExchangeTest {
public:
GxsTestStats(GenExchangeTestService* const testService,
RsGeneralDataService* dataService);
virtual ~GxsTestStats();
void runTests();
private:
void testGroupStatistics();
void testServiceStatistics();
};
#endif // GXSTESTSTATS_H