public void LoaderTest() { m_client1.Call(CreateRegionWithTallyLoader, ScopeType.DistributedNoAck); m_client2.Call(CreateRegionAndGetNEntries, NumEntries); m_client1.Call(VerifyLoaderCallsAfterGets, NumEntries); m_client3.Call(RegionThreeLoadEntries, NumEntries); }
public override void EndTest() { m_client1.Call(Close); m_client2.Call(Close); CacheHelper.StopJavaServers(); base.EndTest(); }
void runCacheless() { CacheHelper.SetupJavaServers(true, "cacheserver_notify_subscription.xml"); CacheHelper.StartJavaLocator(1, "GFELOC"); Util.Log("Locator started"); CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1); Util.Log("Cacheserver 1 started."); Util.Log("Creating region in s1p1-pusher, no-ack, no-cache, no-listener"); m_client1.Call(CreateRegion, CacheHelper.Locators, false, true); Util.Log("Creating region in s1p2-listener, no-ack, no-cache, with-listener"); m_client2.Call(CreateRegion, CacheHelper.Locators, false, true); Util.Log("Creating region in s2p1-storage, no-ack, cache, no-listener"); m_client3.Call(CreateRegion, CacheHelper.Locators, true, true); Util.Log("Creating region in s2p2-subset, no-ack, cache, no-listener"); m_client4.Call(CreateRegion, CacheHelper.Locators, true, true); Util.Log("createRegion seems to return before peers have handshaked... waiting a while."); Thread.Sleep(10000); Util.Log("tired of waiting...."); m_client2.Call(NoEvents); Util.Log("put(1,1) from s1p1-pusher"); m_client1.Call(SendPut, 1, 1); Util.Log("update from s2p1-storage"); m_client3.Call(SendPut, 1, 2); m_client2.Call(CheckEmpty); m_client1.Call(CacheHelper.Close); m_client2.Call(CacheHelper.Close); m_client3.Call(CacheHelper.Close); m_client4.Call(CacheHelper.Close); CacheHelper.StopJavaServer(1); Util.Log("Cacheserver 1 stopped."); CacheHelper.StopJavaLocator(1); Util.Log("Locator stopped"); CacheHelper.ClearEndpoints(); CacheHelper.ClearLocators(); }
public void AckMix() { m_client1.Call(CreateRegionNOIL, 1, false); m_client2.Call(CreateRegionNOIL, 2, true); m_client1.Call(VerifyNoEvents); m_client2.Call(VerifyNoEvents); m_client1.Call(SendCreate); m_client2.Call(TestCreateFromAck); m_client1.Call(TestCreateFromNoAck); m_client2.Call(TestUpdateFromAck); m_client1.Call(TestEventCount, 1); m_client2.Call(TestEventCount, 2); m_client1.Call(TestTimeoutSetup); m_client2.Call(TestPutTimeout, 4000); m_client1.Call(TestAfterPutTimeout, 4000); m_client2.Call(TestPutTimeout, 5000); m_client1.Call(TestAfterPutTimeout, 5000); }
public override void EndTest() { try { m_client1.Call(DestroyRegions); m_client2.Call(DestroyRegions); CacheHelper.ClearEndpoints(); } finally { CacheHelper.StopJavaServers(); } base.EndTest(); }
public void StatisticsCheckTest() { CacheHelper.SetupJavaServers(false, "cacheserver.xml"); CacheHelper.StartJavaServer(1, "GFECS1"); Util.Log("Cacheserver 1 started."); m_client1.Call(CacheHelper.InitClient); m_client1.Call(statisticsTest); CacheHelper.StopJavaServer(1); Util.Log("Cacheserver 1 stopped."); CacheHelper.ClearEndpoints(); m_client1.Call(CacheHelper.Close); }
public override void EndTest() { try { sender.Call(DestroyRegions); receiver.Call(DestroyRegions); CacheHelper.ClearEndpoints(); } finally { CacheHelper.StopJavaServers(); } base.EndTest(); }
public override void EndTest() { try { m_client1.Call(CacheHelper.Close); CacheHelper.ClearEndpoints(); CacheHelper.ClearLocators(); } finally { CacheHelper.StopJavaServers(); } base.EndTest(); }
public void Callbacks() { CacheHelper.SetupJavaServers("cacheserver_notify_subscription.xml"); CacheHelper.StartJavaLocator(1, "GFELOC"); Util.Log("Locator 1 started."); CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1); Util.Log("Cacheserver 1 started."); try { m_client1.Call(CreateTCRegions, RegionNames, CacheHelper.Locators, true); m_client1.Call(StepOneCallbacks); Util.Log("StepOne complete."); m_client2.Call(CreateTCRegions, RegionNames, CacheHelper.Locators, true); m_client2.Call(StepTwoCallbacks); Util.Log("StepTwo complete."); m_client1.Call(StepThreeCallbacks); Util.Log("StepThree complete."); m_client2.Call(StepFourCallbacks); Util.Log("StepFour complete."); m_client1.Call(StepFiveCallbacks); Util.Log("StepFive complete."); } finally { CacheHelper.StopJavaServer(1); Util.Log("Cacheserver 1 stopped."); m_client2.Call(DestroyRegions); CacheHelper.StopJavaLocator(1); CacheHelper.ClearEndpoints(); } }
public void DistOps() { m_client1.Call(CreateRegions, AckRegionNames); Util.Log("StepOne complete."); m_client2.Call(CreateRegions, AckRegionNames); Util.Log("StepTwo complete."); m_client1.Call(StepThree); Util.Log("StepThree complete."); m_client2.Call(StepFour); Util.Log("StepFour complete."); m_client1.Call(StepFive, true); Util.Log("StepFive complete."); Util.Log("StepSix commencing."); m_client2.Call(StepSix, true); Util.Log("StepSix complete."); m_client1.Call(StepSeven); Util.Log("StepSeven complete."); m_client2.Call(StepEight); Util.Log("StepEight complete."); m_client1.Call(StepNine); Util.Log("StepNine complete."); m_client2.Call(StepTen); Util.Log("StepTen complete."); m_client1.Call(StepEleven); Util.Log("StepEleven complete."); }
private void RunTestGetDurableCqsFromServer() { try { CacheHelper.SetupJavaServers(true, "cacheserverDurableCqs.xml"); CacheHelper.StartJavaLocator(1, "GFELOC"); Util.Log("Locator started"); CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1); Util.Log("Cache server 1 started"); m_client1.Call(InitDurableClient, CacheHelper.Locators, 0, "DurableClient1", 300); m_client2.Call(InitDurableClient, CacheHelper.Locators, 0, "DurableClient2", 300); Util.Log("client initialization done."); m_client1.Call(RegisterCqsClient1, false); m_client2.Call(RegisterCqsClient2, false); Util.Log("Registered DurableCQs."); m_client1.Call(VerifyDurableCqListClient1, false); m_client2.Call(VerifyDurableCqListClient2, false); Util.Log("Verified DurableCQ List."); } finally { m_client1.Call(CacheHelper.Close); m_client2.Call(CacheHelper.Close); CacheHelper.StopJavaServer(1); CacheHelper.StopJavaLocator(1); } }
void runAllowPutsGets() { CacheHelper.SetupJavaServers(true, CacheXml1, CacheXml2); CacheHelper.StartJavaLocator(1, "GFELOC"); Util.Log("Locator started"); foreach (AuthzCredentialGenerator authzGen in GetAllGeneratorCombos(false)) { CredentialGenerator cGen = authzGen.GetCredentialGenerator(); Properties <string, string> extraAuthProps = cGen.SystemProperties; Properties <string, string> javaProps = cGen.JavaProperties; Properties <string, string> extraAuthzProps = authzGen.SystemProperties; string authenticator = cGen.Authenticator; string authInit = cGen.AuthInit; string accessor = authzGen.AccessControl; Util.Log("testAllowPutsGets: Using authinit: " + authInit); Util.Log("testAllowPutsGets: Using authenticator: " + authenticator); Util.Log("testAllowPutsGets: Using accessor: " + accessor); // Start servers with all required properties string serverArgs = SecurityTestUtil.GetServerArgs(authenticator, accessor, null, SecurityTestUtil.ConcatProperties(extraAuthProps, extraAuthzProps), javaProps); // Start the two servers. CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1, serverArgs); Util.Log("Cacheserver 1 started."); CacheHelper.StartJavaServerWithLocators(2, "GFECS2", 1, serverArgs); Util.Log("Cacheserver 2 started."); // Start client1 with valid CREATE credentials Properties <string, string> createCredentials = authzGen.GetAllowedCredentials( new OperationCode[] { OperationCode.Put }, new string[] { RegionName }, 1); javaProps = cGen.JavaProperties; Util.Log("AllowPutsGets: For first client PUT credentials: " + createCredentials); m_client1.Call(SecurityTestUtil.CreateClient, RegionName, CacheHelper.Locators, authInit, createCredentials); // Start client2 with valid GET credentials Properties <string, string> getCredentials = authzGen.GetAllowedCredentials( new OperationCode[] { OperationCode.Get }, new string[] { RegionName }, 2); javaProps = cGen.JavaProperties; Util.Log("AllowPutsGets: For second client GET credentials: " + getCredentials); m_client2.Call(SecurityTestUtil.CreateClient, RegionName, CacheHelper.Locators, authInit, getCredentials); // Perform some put operations from client1 m_client1.Call(DoPuts, 2); // Verify that the gets succeed m_client2.Call(DoGets, 2); m_client1.Call(Close); m_client2.Call(Close); CacheHelper.StopJavaServer(1); CacheHelper.StopJavaServer(2); } CacheHelper.StopJavaLocator(1); CacheHelper.ClearEndpoints(); CacheHelper.ClearLocators(); }
void runPoolAttributes() { CacheHelper.SetupJavaServers(true, "cacheserver1_pool.xml", "cacheserver2_pool.xml"); CacheHelper.StartJavaLocator(1, "GFELOC"); CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1); CacheHelper.StartJavaServerWithLocators(2, "GFECS2", 1); m_client1.Call(CacheHelper.setPorts, CacheHelper.HOST_PORT_1, CacheHelper.HOST_PORT_2, CacheHelper.HOST_PORT_3, CacheHelper.LOCATOR_PORT_1, CacheHelper.LOCATOR_PORT_2); m_client1.Call(createPoolAndTestAttrs, "__TEST_POOL1__"); m_client1.Call(testExistingPool, "__TEST_POOL1__"); m_client1.Call(createRegionAndAttachPool, "PoolRegion1", "__TEST_POOL1__"); m_client2.Call(CacheHelper.setPorts, CacheHelper.HOST_PORT_1, CacheHelper.HOST_PORT_2, CacheHelper.HOST_PORT_3, CacheHelper.LOCATOR_PORT_1, CacheHelper.LOCATOR_PORT_2); m_client2.Call(testPoolAttrs, "clientPool"); m_client1.Call(testPoolLevels); m_client1.Call(Close); Util.Log("Client 1 closed"); m_client2.Call(Close); Util.Log("Client 2 closed"); CacheHelper.StopJavaServer(1); Util.Log("Cacheserver 1 stopped."); CacheHelper.StopJavaServer(2); Util.Log("Cacheserver 2 stopped."); CacheHelper.StopJavaLocator(1); Util.Log("Locator 1 stopped."); CacheHelper.ClearEndpoints(); CacheHelper.ClearLocators(); }
void runCallbackArgTest() { CacheHelper.SetupJavaServers(true, "cacheserver_notify_subscription.xml"); CacheHelper.StartJavaLocator(1, "GFELOC"); Util.Log("Locator started"); CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1); Util.Log("Cacheserver 1 started."); Util.Log("Creating region in client1, no-ack, cache-enabled, with listener and writer"); m_client1.Call(CreateRegion, CacheHelper.Locators, true, true, true); m_client1.Call(RegisterAllKeys, new string[] { RegionName }); Util.Log("Creating region in client2 , no-ack, cache-enabled, with listener and writer"); m_client2.Call(CreateRegion, CacheHelper.Locators, true, true, true); m_client2.Call(RegisterAllKeys, new string[] { RegionName }); m_client2.Call(RegisterPdxType8); m_client1.Call(CallOp); m_client1.Call(ValidateLocalListenerWriterData); m_client1.Call(ValidateEvents); m_client1.Call(CacheHelper.Close); m_client2.Call(CacheHelper.Close); CacheHelper.StopJavaServer(1); Util.Log("Cacheserver 1 stopped."); CacheHelper.StopJavaLocator(1); Util.Log("Locator stopped"); CacheHelper.ClearLocators(); CacheHelper.ClearEndpoints(); }
public void DistReg() { m_dataHolder.Call(Puts); m_getter.Call(FindItems); }
public override void InitTests() { base.InitTests(); m_client1.Call(InitKeysValues, MaxKeys); m_client2.Call(InitKeysValues, MaxKeys); m_client3.Call(InitKeysValues, MaxKeys); m_client4.Call(InitKeysValues, MaxKeys); }
void runThinClientListenerWriterTest() { CacheHelper.SetupJavaServers(true, "cacheserver_notify_subscription.xml"); CacheHelper.StartJavaLocator(1, "GFELOC"); Util.Log("Locator started"); CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1); Util.Log("Cacheserver 1 started."); m_client1.Call(CacheHelper.InitClient); Util.Log("Creating region in client1, no-ack, no-cache, no-listener and no-writer"); m_client1.Call(CreateRegion, CacheHelper.Locators, false, false, false); m_client2.Call(CacheHelper.InitClient); Util.Log("Creating region in client2 , no-ack, no-cache, with listener and writer"); m_client2.Call(CreateRegion, CacheHelper.Locators, false, true, true); m_client1.Call(registerPdxType8); m_client2.Call(registerPdxType8); m_client2.Call(RegisterAllKeys, new string[] { RegionName }); m_client1.Call(CallOp); m_client2.Call(ValidateListenerWriterWithNBSTrue); m_client1.Call(CacheHelper.CloseCache); m_client2.Call(CacheHelper.CloseCache); CacheHelper.StopJavaServer(1); CacheHelper.SetupJavaServers(true, "cacheserver.xml"); CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1); Util.Log("Cacheserver 1 started."); Util.Log("Creating region in client1, no-ack, no-cache, no-listener and no-writer"); m_client1.Call(CreateRegion, CacheHelper.Locators, false, false, false); Util.Log("Creating region in client2 , no-ack, no-cache, with listener and writer"); m_client2.Call(CreateRegion, CacheHelper.Locators, false, true, true); m_client3.Call(CacheHelper.InitClient); Util.Log("Creating region in client2 , no-ack, no-cache, with listener and writer"); m_client3.Call(CreateRegion, CacheHelper.Locators, false, true, true); m_client1.Call(registerPdxType8); m_client2.Call(registerPdxType8); m_client2.Call(RegisterAllKeysRN); m_client3.Call(RegisterAllKeysRN); m_client1.Call(CallOp); m_client2.Call(ValidateEvents); m_client3.Call(ValidateEvents); m_client1.Call(CacheHelper.Close); m_client2.Call(CacheHelper.Close); m_client3.Call(CacheHelper.Close); CacheHelper.StopJavaServer(1); /* Bug #381 */ CacheHelper.SetupJavaServers(true, "cacheserver.xml"); CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1); Util.Log("Cacheserver 1 started."); Util.Log("Creating region in client1, no-ack, no-cache, no-listener and no-writer"); m_client1.Call(CreateRegion, CacheHelper.Locators, false, false, false); Util.Log("Creating region in client2 , with listener and writer"); m_client2.Call(CreateRegion, CacheHelper.Locators, true, true, true); m_client3.Call(CacheHelper.InitClient); Util.Log("Creating region in client3 , with listener and writer"); m_client3.Call(CreateRegion, CacheHelper.Locators, true, true, true); m_client2.Call(RegisterAllKeysRN); m_client1.Call(PutOp, "Key-1", "Value-1"); m_client2.Call(GetOp, "Key-1"); m_client2.Call(ValidateGetEvents, 0, 1); Util.Log("ValidateGetEvents 1 done. "); m_client3.Call(RegisterAllKeysRN); m_client3.Call(GetOp, "Key-1"); m_client3.Call(ValidateGetEvents, 1, 0); Util.Log("ValidateGetEvents 2 done. "); m_client2.Call(PutOp, "Key-2", "Value-2"); m_client2.Call(InvalidateOp, "Key-2"); m_client2.Call(GetOp, "Key-2"); m_client2.Call(ValidateGetEvents, 1, 2); Util.Log("ValidateGetEvents 3 done. "); m_client1.Call(CacheHelper.Close); m_client2.Call(CacheHelper.Close); m_client3.Call(CacheHelper.Close); CacheHelper.StopJavaServer(1); CacheHelper.StopJavaLocator(1); Util.Log("Locator stopped"); CacheHelper.ClearLocators(); CacheHelper.ClearEndpoints(); }
void runThinClientCSTXTest() { CacheHelper.SetupJavaServers(true, "client_server_transactions.xml"); CacheHelper.StartJavaLocator(1, "GFELOC"); Util.Log("Locator started"); CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1); Util.Log("Cacheserver 1 started."); m_client1.Call(CacheHelper.InitClient); Util.Log("Creating two regions in client1"); m_client1.Call(CreateRegion, cstxRegions[0], CacheHelper.Locators, false); m_client1.Call(CreateRegion, cstxRegions[1], CacheHelper.Locators, false); m_client1.Call(CreateRegion, cstxRegions[2], CacheHelper.Locators, true); m_client1.Call(CallOp); m_client1.Call(SuspendResumeCommit); m_client1.Call(SuspendResumeRollback); m_client1.Call(SuspendResumeInThread); m_client1.Call(ValidateListener); #region CSTX_COMMENTED - transaction listener and writer are disabled for now /* * m_client1.Call(ValidateCSTXListenerWriter); */ #endregion m_client1.Call(CacheHelper.Close); CacheHelper.StopJavaServer(1); CacheHelper.StopJavaLocator(1); Util.Log("Locator stopped"); CacheHelper.ClearLocators(); CacheHelper.ClearEndpoints(); }
void runDeltaWithAppdomian(bool cloningenable) { CacheHelper.SetupJavaServers(true, "cacheserver_with_deltaAD.xml"); CacheHelper.StartJavaLocator(1, "GFELOC1"); CacheHelper.StartJavaServerWithLocators(1, "GFECS5", 1); string regionName = "DistRegionAck"; // if (usePools) { //CacheHelper.CreateTCRegion_Pool_AD("DistRegionAck", false, false, null, null, CacheHelper.Locators, "__TEST_POOL1__", false, false, false); m_client1.Call(CacheHelper.CreateTCRegion_Pool_AD1, regionName, false, true, CacheHelper.Locators, (string)"__TEST_POOL1__", true, cloningenable); m_client2.Call(CacheHelper.CreateTCRegion_Pool_AD1, regionName, false, true, CacheHelper.Locators, (string)"__TEST_POOL1__", false, cloningenable); // m_client1.Call(createPool, "__TEST_POOL1__", CacheHelper.Locators, (string)null, 0, false); // m_client1.Call(createRegionAndAttachPool, "DistRegionAck", "__TEST_POOL1__"); } m_client1.Call(initializeDeltaClientAD); m_client2.Call(initializeDeltaClientAD); m_client1.Call(DoDeltaAD_C1_1); m_client2.Call(DoDeltaAD_C2_1); m_client1.Call(DoDeltaAD_C1_afterC2Put); m_client1.Call(Close); m_client2.Call(Close); CacheHelper.StopJavaServer(1); CacheHelper.StopJavaLocator(1); CacheHelper.ClearEndpoints(); CacheHelper.ClearLocators(); }
public override void InitTests() { base.InitTests(); m_client1.Call(InitClient); m_client2.Call(InitClient); }
void runCQTest() { CacheHelper.SetupJavaServers(true, "remotequeryN.xml"); CacheHelper.StartJavaLocator(1, "GFELOC"); Util.Log("Locator started"); DummyAuthorization3 da = new DummyAuthorization3(); string authenticator = da.Authenticator; string authInit = da.AuthInit; string accessorPP = da.AuthenticatorPP; Util.Log("testAllowPutsGets: Using authinit: " + authInit); Util.Log("testAllowPutsGets: Using authenticator: " + authenticator); Util.Log("testAllowPutsGets: Using accessorPP: " + accessorPP); // Start servers with all required properties string serverArgs = SecurityTestUtil.GetServerArgs(authenticator, null, accessorPP, null, null); // Start the two servers. CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1, serverArgs); Util.Log("Cacheserver 1 started."); CacheHelper.StartJavaServerWithLocators(2, "GFECS2", 1, serverArgs); Util.Log("Cacheserver 2 started."); // Start client1 with valid CREATE credentials, this index will be used to authorzie the user Properties <string, string> createCredentials = da.GetValidCredentials(4); Util.Log("runCQTest: "); m_client1.Call(SecurityTestUtil.CreateClientMU2, RegionName_CQ, CacheHelper.Locators, authInit, (Properties <string, string>)null, true, true); m_client2.Call(SecurityTestUtil.CreateClientMU, RegionName_CQ, CacheHelper.Locators, authInit, (Properties <string, string>)null, true); // Perform some put operations from client1 m_client1.Call(registerCQ, createCredentials, false); // Verify that the gets succeed m_client2.Call(doCQPut, createCredentials); m_client1.Call(verifyCQEvents, true, CqOperationType.OP_TYPE_CREATE); m_client1.Call(CloseUserCache, false); m_client1.Call(Close); m_client2.Call(Close); CacheHelper.StopJavaServer(1); // CacheHelper.StopJavaServer(2); CacheHelper.StopJavaLocator(1); CacheHelper.ClearEndpoints(); CacheHelper.ClearLocators(); }