summaryrefslogtreecommitdiff
path: root/test/ClientTest.h
diff options
context:
space:
mode:
authorChen Congwu <congwu.chen@intel.com>2009-12-16 14:43:08 +0800
committerChen Congwu <congwu.chen@intel.com>2009-12-17 10:18:18 +0800
commit426526e496861f974b293c3cd0fda95e6c570c77 (patch)
tree9637386487c8c7335abd66f1093547387f0fdc32 /test/ClientTest.h
parent36b76a6edde383e5b9d4db4fbdbf4dd6299c4013 (diff)
ClientTest: enabling the test with virtual syncsource
Virtual syncsource should be viewed as a single source by the synccontext while as a list of sub datasources for the LocalTest.
Diffstat (limited to 'test/ClientTest.h')
-rw-r--r--test/ClientTest.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/test/ClientTest.h b/test/ClientTest.h
index 4722fa4d..6308063e 100644
--- a/test/ClientTest.h
+++ b/test/ClientTest.h
@@ -291,15 +291,30 @@ class ClientTest {
* Data sources are enumbered from 0 to n-1 for the purpose of
* testing. This call returns n.
*/
- virtual int getNumSources() = 0;
+ virtual int getNumLocalSources() = 0;
+ virtual int getNumSyncSources() = 0;
/**
* Called to fill the given test source config with information
* about a sync source identified by its index. It's okay to only
* fill in the available pieces of information and set everything
* else to zero.
+ * Two kinds of source config indexs are maintained, used for localSources
+ * and SyncSources, this is because virtual datasoures should be visible as
+ * a whole to the synccontext while should be viewed as a list of sub
+ * datasoures for Localtests.
*/
- virtual void getSourceConfig(int source, Config &config) = 0;
+ virtual void getLocalSourceConfig(int source, Config &config) = 0;
+ virtual void getSyncSourceConfig(int source, Config &config) = 0;
+
+ /**
+ * Find the correspoding test source config via config name.
+ */
+ virtual void getSourceConfig(const string &configName, Config &config) =0;
+ /*
+ * Give me a test source config name, return the index in localSyncSources.
+ * */
+ virtual int getLocalSourcePosition (const string &configName) =0;
/**
* The instance to use as second client. Returning NULL disables