コード例 #1
0
 /**
  * Creates and initializes the singleton instance of CQTest in a client and start the CQs running.
  */
 public static synchronized void HydraTask_initializeClient() {
   if (testInstance == null) {
     testInstance = new CQKnownKeysTest();
     testInstance.initializeClient(true);
   }
   testInstance.uniqueKeyIndex.set(new Integer(RemoteTestModule.getCurrentThread().getThreadId()));
 }
コード例 #2
0
 /** Creates and initializes a data store PR in a bridge server. */
 public static synchronized void HydraTask_initializeBridgeServer() {
   if (testInstance == null) {
     testInstance = new CQKnownKeysTest();
     testInstance.initializeRegion("serverRegion");
     testInstance.initializeInstance();
     BridgeHelper.startBridgeServer("bridge");
     testInstance.isBridgeClient = false;
   }
   testInstance.uniqueKeyIndex.set(new Integer(RemoteTestModule.getCurrentThread().getThreadId()));
 }
コード例 #3
0
 /**
  * Create a region with the given region description name.
  *
  * @param regDescriptName The name of a region description.
  */
 protected void initializeRegion(String regDescriptName) {
   CacheHelper.createCache("cache1");
   String key = VmIDStr + RemoteTestModule.getMyVmid();
   String xmlFile = key + ".xml";
   try {
     CacheHelper.generateCacheXmlFile("cache1", regDescriptName, xmlFile);
   } catch (HydraRuntimeException e) {
     if (e.toString().indexOf("Cache XML file was already created") >= 0) {
       // this can occur when reinitializing after a stop-start because
       // the cache xml file is written during the first init tasks
     } else {
       throw new TestException(TestHelper.getStackTrace(e));
     }
   }
   aRegion = RegionHelper.createRegion(regDescriptName);
 }