privacore-open-source-searc.../misc/Test.h

72 lines
1.1 KiB
C
Raw Normal View History

2013-08-02 16:12:24 -04:00
// Copyright Matt Wells 2009
2016-03-08 16:14:30 -05:00
#ifndef GB_TEST_H
#define GB_TEST_H
2013-08-02 16:12:24 -04:00
#include "Msg4.h"
#include "Spider.h"
#include "HashTableX.h"
class Test {
public:
Test();
char *getTestDir ( );
//char *m_testDir;
bool init ( ) ;
void reset ( ) ;
void removeFiles();
void initTestRun();
bool injectLoop();
void stopIt();
// is test running now?
bool m_isRunning;
// how many urls we added to spiderdb via msg4
2014-11-10 17:45:11 -05:00
int32_t m_urlsAdded;
2013-08-02 16:12:24 -04:00
2014-11-10 17:45:11 -05:00
int32_t m_urlsIndexed;
2013-08-02 16:12:24 -04:00
//bool m_spiderLinks;
bool m_bypassMenuElimination;
// are still in a loop adding urls to spiderdb via msg4?
bool m_isAdding;
2014-10-30 15:36:39 -04:00
int64_t m_testStartTime;
2013-08-02 16:12:24 -04:00
// this is set to the errno if any error encounted during the test
2014-11-10 17:45:11 -05:00
int32_t m_errno ;
2013-08-02 16:12:24 -04:00
// unique test id
2014-11-10 17:45:11 -05:00
int32_t m_runId ;
2013-08-02 16:12:24 -04:00
char *m_coll ;
SpiderRequest m_sreq;
Msg4 m_msg4;
// dedup table
HashTableX m_dt;
bool m_testSpiderEnabledSaved ;
bool m_testParserEnabledSaved ;
// file of urls in the test subdir is read into this buffer
char *m_urlBuf ;
char *m_urlEnd ;
char *m_urlPtr ;
};
// the global class
extern Test g_test;
2016-03-08 16:14:30 -05:00
#endif // GB_TEST_H