mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -05:00
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:
parent
a29f382175
commit
be20086e09
@ -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)
|
||||
{
|
||||
|
@ -52,6 +52,9 @@ public:
|
||||
|
||||
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
|
||||
* be called to ensure the operation has completed
|
||||
|
@ -59,6 +59,16 @@ bool GenExchangeTestService::getMsgRelatedDataTS(const uint32_t &token, GxsMsgRe
|
||||
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)
|
||||
{
|
||||
return getMsgMeta(token, msgInfo);
|
||||
|
@ -81,6 +81,16 @@ public:
|
||||
*/
|
||||
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);
|
||||
|
||||
|
@ -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()
|
||||
{
|
||||
}
|
@ -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
|
Loading…
Reference in New Issue
Block a user