http://git-wip-us.apache.org/repos/asf/geode-native/blob/7c7f73cc/src/cppcache/integration-test/testThinClientPdxTestsWithAuto.cpp ---------------------------------------------------------------------- diff --git a/src/cppcache/integration-test/testThinClientPdxTestsWithAuto.cpp b/src/cppcache/integration-test/testThinClientPdxTestsWithAuto.cpp deleted file mode 100644 index f114761..0000000 --- a/src/cppcache/integration-test/testThinClientPdxTestsWithAuto.cpp +++ /dev/null @@ -1,3558 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "fw_dunit.hpp" -#include <geode/GeodeCppCache.hpp> -#include <ace/OS.h> -#include <ace/High_Res_Timer.h> -#include <string> - -#define ROOT_NAME "testThinClientPdxTestsAuto" -#define ROOT_SCOPE DISTRIBUTED_ACK - -#include "ThinClientHelper.hpp" -#include "testobject/PdxClassV1WithAuto.hpp" -#include "testobject/PdxClassV2WithAuto.hpp" -#include "testobject/VariousPdxTypesWithAuto.hpp" -#include "testobject/PdxTypeWithAuto.hpp" -#include <Utils.hpp> -#include "CachePerfStats.hpp" -#include <LocalRegion.hpp> - -using namespace apache::geode::client; -using namespace PdxTestsAuto; - -#define CLIENT1 s1p1 -#define CLIENT2 s1p2 -#define CLIENT3 s2p2 -#define LOCATOR s2p2 -#define SERVER1 s2p1 - -bool isLocator = false; -bool isLocalServer = false; - -const char* poolNames[] = {"Pool1", "Pool2", "Pool3"}; -const char* locHostPort = - CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1); -bool isPoolConfig = false; // To track if pool case is running -// const char * qRegionNames[] = { "Portfolios", "Positions", "Portfolios2", -// "Portfolios3" }; -static bool m_useWeakHashMap = false; - -void initClient(const bool isthinClient, bool isPdxIgnoreUnreadFields) { - LOGINFO("isPdxIgnoreUnreadFields = %d ", isPdxIgnoreUnreadFields); - if (cacheHelper == NULL) { - cacheHelper = new CacheHelper(isthinClient, isPdxIgnoreUnreadFields, false, - NULLPTR, false); - } - ASSERT(cacheHelper, "Failed to create a CacheHelper client instance."); -} - -void initClient2WithClientName(const bool isthinClient, - const PropertiesPtr& configPtr = NULLPTR) { - if (cacheHelper == NULL) { - PropertiesPtr config = configPtr; - if (config == NULLPTR) { - config = Properties::create(); - } - config->insert("name", "Client-2"); - cacheHelper = new CacheHelper(isthinClient, config); - } - ASSERT(cacheHelper, "Failed to create a CacheHelper client instance."); -} - -void stepOneForClient2(bool pool = false, bool locator = false, - bool isPdxIgnoreUnreadFields = false) { - // Create just one pool and attach all regions to that. - initClient2WithClientName(true); - - if (locator) { - isPoolConfig = true; - createPool(poolNames[0], locHostPort, NULL, 0, true); - createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0], - false /*Caching disabled*/); - } else { - isPoolConfig = true; - createPool(poolNames[0], NULL, NULL, 0, true); - createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0], false); - } - LOG("StepOne complete."); -} -void stepOne(bool pool = false, bool locator = false, - bool isPdxIgnoreUnreadFields = false) { - try { - // Serializable::registerType(Position::createDeserializable); - // Serializable::registerType(Portfolio::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - // Create just one pool and attach all regions to that. - initClient(true, isPdxIgnoreUnreadFields); - if (!pool) { - createRegion("DistRegionAck", USE_ACK, false /*Caching disabled*/); - } else if (locator) { - isPoolConfig = true; - createPool(poolNames[0], locHostPort, NULL, 0, true); - createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0], - false /*Caching disabled*/); - } else { - isPoolConfig = true; - createPool(poolNames[0], NULL, NULL, 0, true); - createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0], false); - } - LOG("StepOne complete."); -} - -void initClient1(bool pool = false, bool locator = false, - bool isPdxIgnoreUnreadFields = false) { - // Create just one pool and attach all regions to that. - initClient(true, isPdxIgnoreUnreadFields); - if (locator) { - isPoolConfig = true; - createPool(poolNames[0], locHostPort, NULL, 0, false); - createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0], - true /*Caching enabled*/); - } else { - isPoolConfig = true; - createPool(poolNames[0], NULL, NULL, 0, false); - createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0], true); - } - LOG("StepOne complete."); -} - -void initClient2(bool pool = false, bool locator = false, - bool isPdxIgnoreUnreadFields = false) { - // Create just one pool and attach all regions to that. - initClient(true, isPdxIgnoreUnreadFields); - if (locator) { - isPoolConfig = true; - createPool(poolNames[0], locHostPort, NULL, 0, - true /*ClientNotification enabled*/); - createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0], - true /*Caching enabled*/); - } else { - isPoolConfig = true; - createPool(poolNames[0], NULL, NULL, 0, true); - createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0], true); - } - LOG("StepOne complete."); -} - -void initClient3(bool pool = false, bool locator = false, - bool isPdxIgnoreUnreadFields = false) { - // Create just one pool and attach all regions to that. - initClient(true, isPdxIgnoreUnreadFields); - if (locator) { - isPoolConfig = true; - createPool(poolNames[0], locHostPort, NULL, 0, - true /*ClientNotification enabled*/); - createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0], - true /*Caching enabled*/); - } else { - isPoolConfig = true; - createPool(poolNames[0], NULL, NULL, 0, true); - createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0], true); - } - LOG("StepOne complete."); -} - -DUNIT_TASK_DEFINITION(SERVER1, StartLocator) - { - // starting locator 1 2 - if (isLocator) { - CacheHelper::initLocator(1); - } - LOG("Locator started"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, StepOnePoolLoc_PDX) - { - LOG("Starting Step One with Pool + Locator lists"); - stepOne(true, true, true); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, StepOnePoolLoc) - { - LOG("Starting Step One with Pool + Locator lists"); - stepOne(true, true); - } -END_TASK_DEFINITION - -// StepOnePoolLoc_PdxMetadataTest -DUNIT_TASK_DEFINITION(CLIENT1, StepOnePoolLoc_PdxMetadataTest) - { - LOG("Starting Step One with Pool + Locator lists"); - initClient1(true, true); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(SERVER1, CreateServer) - { - LOG("Starting SERVER1..."); - if (isLocalServer) CacheHelper::initServer(1, "cacheserverPdx.xml"); - LOG("SERVER1 started"); - } -END_TASK_DEFINITION -// -DUNIT_TASK_DEFINITION(SERVER1, CreateServerWithLocator) - { - LOG("Starting SERVER1..."); - if (isLocalServer) { - CacheHelper::initServer(1, "cacheserverPdx.xml", locHostPort); - } - LOG("SERVER1 started"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(SERVER1, CreateServer_PdxMetadataTest) - { - LOG("Starting SERVER1..."); - if (isLocalServer) CacheHelper::initServer(1, "cacheserverPdx2.xml"); - LOG("SERVER1 started"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(SERVER1, CreateServerWithLocator_PdxMetadataTest) - { - LOG("Starting SERVER1..."); - if (isLocalServer) { - CacheHelper::initServer(1, "cacheserverPdx2.xml", locHostPort); - } - LOG("SERVER1 started"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(SERVER1, CreateServer1) - { - LOG("Starting SERVER1..."); - if (isLocalServer) CacheHelper::initServer(1, "cacheserver.xml"); - LOG("SERVER1 started"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(SERVER1, CreateServerWithLocator1) - { - LOG("Starting SERVER1..."); - if (isLocalServer) { - CacheHelper::initServer(1, "cacheserver.xml", locHostPort); - } - LOG("SERVER1 started"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(SERVER1, CreateServer2) - { - LOG("Starting SERVER1..."); - if (isLocalServer) { - CacheHelper::initServer(1, "cacheserverForPdxWithAuto.xml"); - } - LOG("SERVER1 started"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(SERVER1, CreateServerWithLocator2) - { - LOG("Starting SERVER1..."); - if (isLocalServer) { - CacheHelper::initServer(1, "cacheserverForPdxWithAuto.xml", locHostPort); - } - LOG("SERVER1 started"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, StepOne) - { - LOG("Starting Step One"); - stepOne(); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, StepOnePoolEP) - { - LOG("Starting Step One with Pool + Explicit server list"); - stepOne(true); - } -END_TASK_DEFINITION - -////StepOnePoolEP -DUNIT_TASK_DEFINITION(CLIENT1, StepOnePoolEP_PdxMetadataTest) - { - LOG("Starting Step One with Pool + Explicit server list"); - initClient1(true, false); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, StepOnePoolEP_PDX) - { - LOG("Starting Step One with Pool + Explicit server list"); - stepOne(true, false, true); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, StepTwoPoolEP) - { - LOG("Starting Step One with Pool + Explicit server list"); - stepOne(true); - } -END_TASK_DEFINITION - -// DUNIT_TASK_DEFINITION(CLIENT2, StepTwoPoolEPBug866) -//{ -// LOG("Starting Step One with Pool + Explicit server list"); -// stepOneForClient2(true); -//} -// END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, StepTwoPoolLocBug866) - { - LOG("Starting Step Two with Pool + Locator"); - stepOneForClient2(true, true); - } -END_TASK_DEFINITION - -// StepTwoPoolEP_PdxMetadataTest -DUNIT_TASK_DEFINITION(CLIENT2, StepTwoPoolEP_PdxMetadataTest) - { - LOG("Starting Step One with Pool + Explicit server list"); - initClient2(true, false); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT3, StepThreePoolEP_PdxMetadataTest) - { - LOG("Starting Step One with Pool + Explicit server list"); - initClient3(true, false); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, StepTwoPoolEP_PDX) - { - LOG("Starting Step One with Pool + Explicit server list"); - stepOne(true, false, true); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, StepTwoPoolLoc) - { - LOG("Starting Step Two with Pool + Locator"); - stepOne(true, true); - } -END_TASK_DEFINITION - -// StepTwoPoolLoc_PdxMetadataTest -DUNIT_TASK_DEFINITION(CLIENT2, StepTwoPoolLoc_PdxMetadataTest) - { - LOG("Starting Step Two with Pool + Locator"); - initClient2(true, true); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT3, StepThreePoolLoc_PdxMetadataTest) - { - LOG("Starting Step Two with Pool + Locator"); - initClient3(true, true); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, StepTwoPoolLoc_PDX) - { - LOG("Starting Step Two with Pool + Locator"); - stepOne(true, false, true); - } -END_TASK_DEFINITION - -void checkPdxInstanceToStringAtServer(RegionPtr regionPtr) { - CacheableKeyPtr keyport = CacheableKey::create("success"); - CacheableBooleanPtr boolPtr = - dynCast<CacheableBooleanPtr>(regionPtr->get(keyport)); - bool val = boolPtr->value(); - // TODO::Enable asser and disable LOGINFO - ASSERT(val == true, "checkPdxInstanceToStringAtServer: Val should be true"); - LOGINFO("NIL::checkPdxInstanceToStringAtServer:139: val = %d", val); -} - -DUNIT_TASK_DEFINITION(CLIENT1, testPutWithMultilevelInheritance) - { - try { - Serializable::registerPdxType(PdxTestsAuto::Child::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - int expectedExceptionCount ATTR_UNUSED = 0; - - // Put operation - CacheableKeyPtr keyport = CacheableKey::create(1); - CacheablePtr pdxobj(new PdxTestsAuto::Child()); - regPtr0->put(keyport, pdxobj); - LOGINFO("TASK::testPutWithMultilevelInheritance:: Put successful"); - - // Get Operation and check fromDataExceptionCount, Expected is 41. - PdxTestsAuto::ChildPtr obj2 = - dynCast<PdxTestsAuto::ChildPtr>(regPtr0->get(keyport)); - // LOGINFO("Task: testPutWithMultilevelInheritance: got members :: %d %d %d - // %d - // %d %d ", obj2->getMember_a(), obj2->getMember_b(), obj2->getMember_c(), - // obj2->getMember_d(), obj2->getMember_e(), obj2->getMember_f()); - bool isEqual = (dynCast<PdxTestsAuto::ChildPtr>(pdxobj))->equals(obj2); - LOGINFO("testPutWithMultilevelInheritance:.. isEqual = %d", isEqual); - ASSERT(isEqual == true, "Objects of type class Child should be equal"); - - LOGINFO("TASK::testPutWithMultilevelInheritance:: Get successful"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, testGetWithMultilevelInheritance) - { - try { - Serializable::registerPdxType(PdxTestsAuto::Child::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport1 = CacheableKey::create(1); - PdxTestsAuto::ChildPtr obj1 = - dynCast<PdxTestsAuto::ChildPtr>(regPtr0->get(keyport1)); - - CacheablePtr pdxobj(new PdxTestsAuto::Child()); - bool isEqual = (dynCast<PdxTestsAuto::ChildPtr>(pdxobj))->equals(obj1); - LOGINFO("testPutWithMultilevelInheritance:.. isEqual = %d", isEqual); - ASSERT(isEqual == true, "Objects of type class Child should be equal"); - // LOGINFO("Task: testGetWithMultilevelInheritance: got members :: %d %d %d - // %d - // %d %d ", obj1->getMember_a(), obj1->getMember_b(), obj1->getMember_c(), - // obj1->getMember_d(), obj1->getMember_e(), obj1->getMember_f()); - LOGINFO( - "TASK::testGetWithMultilevelInheritance GET completed Successfully"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, JavaPutGet) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxType::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::Address::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - CacheablePtr pdxobj(new PdxTestsAuto::PdxType()); - regPtr0->put(keyport, pdxobj); - LOGINFO("JavaPutGet:.. Put Done"); - - PdxTestsAuto::PdxTypePtr obj2 = - dynCast<PdxTestsAuto::PdxTypePtr>(regPtr0->get(keyport)); - - CacheableBooleanPtr boolPtr = - dynCast<CacheableBooleanPtr>(regPtr0->get("success")); - bool isEqual = boolPtr.ptr()->value(); - LOGDEBUG("Task:JavaPutGet: isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Task JavaPutGet:Objects of type PdxType should be equal"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, JavaGet) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxType::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::Address::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - LOGDEBUG("JavaGet-1 Line_309"); - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport1 = CacheableKey::create(1); - CacheablePtr pdxobj(new PdxTestsAuto::PdxType()); - LOGDEBUG("JavaGet-2 Line_314"); - PdxTestsAuto::PdxTypePtr obj1 = - dynCast<PdxTestsAuto::PdxTypePtr>(regPtr0->get(keyport1)); - LOGDEBUG("JavaGet-3 Line_316"); - CacheableKeyPtr keyport2 = CacheableKey::create("putFromjava"); - LOGDEBUG("JavaGet-4 Line_316"); - PdxTestsAuto::PdxTypePtr obj2 = - dynCast<PdxTestsAuto::PdxTypePtr>(regPtr0->get(keyport2)); - LOGDEBUG("JavaGet-5 Line_320"); - } -END_TASK_DEFINITION - -///***************************************************************/ -DUNIT_TASK_DEFINITION(CLIENT2, putAtVersionTwoR21) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypesR2V2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxTypesR2V2Ptr np(new PdxTestsAuto::PdxTypesR2V2()); - - regPtr0->put(keyport, np); - - PdxTestsAuto::PdxTypesR2V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesR2V2Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("putAtVersionTwoR21:.. isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxTypesR2V2 should be equal at putAtVersionTwoR21"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, getPutAtVersionOneR22) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypesV1R2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxTypesV1R2Ptr np(new PdxTestsAuto::PdxTypesV1R2()); - - PdxTestsAuto::PdxTypesV1R2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesV1R2Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("getPutAtVersionOneR22:.. isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Objects of type PdxTypesV1R2 should be equal at " - "getPutAtVersionOneR22"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, getPutAtVersionTwoR23) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxTypesR2V2Ptr np(new PdxTestsAuto::PdxTypesR2V2()); - - PdxTestsAuto::PdxTypesR2V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesR2V2Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("getPutAtVersionTwoR23:.. isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Objects of type PdxTypesR2V2 should be equal at " - "getPutAtVersionTwoR23"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, getPutAtVersionOneR24) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxTypesV1R2Ptr np(new PdxTestsAuto::PdxTypesV1R2()); - - PdxTestsAuto::PdxTypesV1R2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesV1R2Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("getPutAtVersionOneR24:.. isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Objects of type PdxTypesV1R2 should be equal at " - "getPutAtVersionOneR24"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, putAtVersionOne31) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxType3V1::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxType3V1Ptr np(new PdxTestsAuto::PdxType3V1()); - - regPtr0->put(keyport, np); - - PdxTestsAuto::PdxType3V1Ptr pRet = - dynCast<PdxTestsAuto::PdxType3V1Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("Task:putAtVersionOne31: isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Objects of type PdxType3V1 should be equal at putAtVersionOne31"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, getPutAtVersionTwo32) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes3V2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxTypes3V2Ptr np(new PdxTestsAuto::PdxTypes3V2()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxTypes3V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypes3V2Ptr>(regPtr0->get(keyport)); - bool isEqual = np->equals(pRet); - LOGDEBUG("Task:getPutAtVersionTwo32.. isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxTypes3V2 should be equal at getPutAtVersionTwo32"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, getPutAtVersionOne33) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxType3V1Ptr np(new PdxTestsAuto::PdxType3V1()); - - PdxTestsAuto::PdxType3V1Ptr pRet = - dynCast<PdxTestsAuto::PdxType3V1Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("getPutAtVersionOne33:.. isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxType3V1 should be equal at getPutAtVersionOne33"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, getPutAtVersionTwo34) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - PdxTestsAuto::PdxTypes3V2Ptr np(new PdxTestsAuto::PdxTypes3V2()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxTypes3V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypes3V2Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("Task:getPutAtVersionTwo34: isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxType3V1 should be equal at getPutAtVersionTwo34"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, putAtVersionOne21) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxType2V1::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxType2V1Ptr np(new PdxTestsAuto::PdxType2V1()); - - regPtr0->put(keyport, np); - - PdxTestsAuto::PdxType2V1Ptr pRet = - dynCast<PdxTestsAuto::PdxType2V1Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("Task:putAtVersionOne21:.. isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Objects of type PdxType2V1 should be equal at putAtVersionOne21"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, getPutAtVersionTwo22) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes2V2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxTypes2V2Ptr np(new PdxTestsAuto::PdxTypes2V2()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxTypes2V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypes2V2Ptr>(regPtr0->get(keyport)); - bool isEqual = np->equals(pRet); - LOGDEBUG("Task:getPutAtVersionTwo22.. isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxTypes2V2 should be equal at getPutAtVersionTwo22"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, getPutAtVersionOne23) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - PdxTestsAuto::PdxType2V1Ptr np(new PdxTestsAuto::PdxType2V1()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxType2V1Ptr pRet = - dynCast<PdxTestsAuto::PdxType2V1Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("Task:getPutAtVersionOne23: isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxType2V1 should be equal at getPutAtVersionOne23"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, getPutAtVersionTwo24) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxTypes2V2Ptr np(new PdxTestsAuto::PdxTypes2V2()); - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxTypes2V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypes2V2Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("Task:getPutAtVersionTwo24.. isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxTypes2V2 should be equal at getPutAtVersionTwo24"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, putAtVersionOne11) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxType1V1::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxType1V1Ptr np(new PdxTestsAuto::PdxType1V1()); - - regPtr0->put(keyport, np); - - PdxTestsAuto::PdxType1V1Ptr pRet = - dynCast<PdxTestsAuto::PdxType1V1Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("NIL:putAtVersionOne11:.. isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Objects of type PdxType1V1 should be equal at putAtVersionOne11 " - "Line_170"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, putAtVersionTwo1) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypesR1V2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - PdxTestsAuto::PdxTypesR1V2::reset(false); - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxTypesR1V2Ptr np(new PdxTestsAuto::PdxTypesR1V2()); - - regPtr0->put(keyport, np); - - PdxTestsAuto::PdxTypesR1V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesR1V2Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("NIL:putAtVersionTwo1:.. isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Objects of type PdxTypesR1V2 should be equal at putAtVersionTwo1"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, getPutAtVersionOne2) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypesV1R1::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - PdxTestsAuto::PdxTypesV1R1Ptr np(new PdxTestsAuto::PdxTypesV1R1()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxTypesV1R1Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesV1R1Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("NIL:getPutAtVersionOne2:.. isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxTypesV1R1 should be equal at getPutAtVersionOne2"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, getPutAtVersionTwo3) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxTypesR1V2Ptr np(new PdxTestsAuto::PdxTypesR1V2()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxTypesR1V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesR1V2Ptr>(regPtr0->get(keyport)); - bool isEqual = np->equals(pRet); - LOGDEBUG("NIL:getPutAtVersionTwo3.. isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxTypesR1V2 should be equal at getPutAtVersionTwo3"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, getPutAtVersionOne4) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxTypesV1R1Ptr np(new PdxTestsAuto::PdxTypesV1R1()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxTypesV1R1Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesV1R1Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("getPutAtVersionOne4: isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxTypesV1R1 should be equal at getPutAtVersionOne4"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, getPutAtVersionTwo5) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxTypesR1V2Ptr np(new PdxTestsAuto::PdxTypesR1V2()); - - // GET - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxTypesR1V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesR1V2Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("Task:getPutAtVersionTwo5.. isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxTypesR1V2 should be equal at getPutAtVersionTwo5"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, getPutAtVersionOne6) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxTypesV1R1Ptr np(new PdxTestsAuto::PdxTypesV1R1()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxTypesV1R1Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesV1R1Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("Task getPutAtVersionOne6:.. isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxTypesV1R1 should be equal at getPutAtVersionOne6"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, putV2PdxUI) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypesIgnoreUnreadFieldsV2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - // PdxTestsAuto::PdxTypesIgnoreUnreadFieldsV2::reset(false); - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxTypesIgnoreUnreadFieldsV2Ptr np( - new PdxTestsAuto::PdxTypesIgnoreUnreadFieldsV2()); - CacheableKeyPtr keyport = CacheableKey::create(1); - regPtr0->put(keyport, np); - - PdxTestsAuto::PdxTypesIgnoreUnreadFieldsV2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesIgnoreUnreadFieldsV2Ptr>( - regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("NIL:putV2PdxUI:.. isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Objects of type PdxTypesIgnoreUnreadFieldsV2 should be equal at " - "putV2PdxUI "); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION -// -DUNIT_TASK_DEFINITION(CLIENT1, putV1PdxUI) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypesIgnoreUnreadFieldsV1::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - // PdxTestsAuto::PdxTypesIgnoreUnreadFieldsV1::reset(false); - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxTypesIgnoreUnreadFieldsV1Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesIgnoreUnreadFieldsV1Ptr>( - regPtr0->get(keyport)); - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, getV2PdxUI) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTypesIgnoreUnreadFieldsV2Ptr np(new PdxTypesIgnoreUnreadFieldsV2()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxTypesIgnoreUnreadFieldsV2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypesIgnoreUnreadFieldsV2Ptr>( - regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("Task:getV2PdxUI:.. isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Objects of type PdxTypesIgnoreUnreadFieldsV2 should be equal at " - "getV2PdxUI "); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, getPutAtVersionTwo12) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes1V2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - PdxTestsAuto::PdxTypes1V2Ptr np(new PdxTestsAuto::PdxTypes1V2()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxTypes1V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypes1V2Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("NIL:getPutAtVersionTwo12:.. isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Objects of type PdxType1V2 should be equal at getPutAtVersionTwo12 " - "Line_197"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, getPutAtVersionOne13) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxType1V1Ptr np(new PdxTestsAuto::PdxType1V1()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxType1V1Ptr pRet = - dynCast<PdxType1V1Ptr>(regPtr0->get(keyport)); - bool isEqual = np->equals(pRet); - - LOGDEBUG("NIL:getPutAtVersionOne13:221.. isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Objects of type PdxType1V2 should be equal at getPutAtVersionOne13 " - "Line_215"); - - LOGDEBUG("NIL:getPutAtVersionOne13: PUT remote object -1"); - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, getPutAtVersionTwo14) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxTypes1V2Ptr np(new PdxTestsAuto::PdxTypes1V2()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxTypes1V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypes1V2Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("NIL:getPutAtVersionTwo14:241.. isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxTypes1V2 should be equal at getPutAtVersionTwo14 " - "Line_242"); - - regPtr0->put(keyport, pRet); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, getPutAtVersionOne15) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxType1V1Ptr np(new PdxTestsAuto::PdxType1V1()); - - // GET - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::PdxType1V1Ptr pRet = - dynCast<PdxTestsAuto::PdxType1V1Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("NIL:getPutAtVersionOne15:784.. isEqual = %d", isEqual); - ASSERT(isEqual == true, - "Objects of type PdxType1V2 should be equal at getPutAtVersionOne15 " - "Line_272"); - - regPtr0->put(keyport, pRet); - LOGDEBUG( - "NIL:getPutAtVersionOne15 m_useWeakHashMap = %d and " - "TestUtils::testNumberOfPreservedData() = %d", - m_useWeakHashMap, TestUtils::testNumberOfPreservedData()); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, getPutAtVersionTwo16) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxTypes1V2Ptr np(new PdxTestsAuto::PdxTypes1V2()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxTypes1V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypes1V2Ptr>(regPtr0->get(keyport)); - - bool isEqual = np->equals(pRet); - LOGDEBUG("NIL:getPutAtVersionTwo14:.. isEqual = %d", isEqual); - ASSERT( - isEqual == true, - "Objects of type PdxTypes1V2 should be equal at getPutAtVersionTwo14"); - - regPtr0->put(keyport, pRet); - LOGDEBUG( - "getPutAtVersionTwo16 m_useWeakHashMap = %d and " - "TestUtils::testNumberOfPreservedData() = %d", - m_useWeakHashMap, TestUtils::testNumberOfPreservedData()); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, PutAndVerifyPdxInGet) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxType::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::Address::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - - CacheablePtr pdxobj(new PdxTestsAuto::PdxType()); - - regPtr0->put(keyport, pdxobj); - - PdxTestsAuto::PdxTypePtr obj2 = - dynCast<PdxTestsAuto::PdxTypePtr>(regPtr0->get(keyport)); - - checkPdxInstanceToStringAtServer(regPtr0); - - ASSERT(cacheHelper->getCache()->getPdxReadSerialized() == false, - "Pdx read serialized property should be false."); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO("PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT(lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() == - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be equal to Total " - "pdxSerializations."); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() == - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be equal to Total " - "pdxSerializationsBytes."); - - LOG("StepThree complete.\n"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, PutAndVerifyNestedPdxInGet) - { - LOG("PutAndVerifyNestedPdxInGet started."); - - try { - Serializable::registerPdxType( - PdxTestsAuto::NestedPdx::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes1::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - PdxTestsAuto::NestedPdxPtr p1(new PdxTestsAuto::NestedPdx()); - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - - regPtr0->put(keyport, p1); - - PdxTestsAuto::NestedPdxPtr obj2 = - dynCast<PdxTestsAuto::NestedPdxPtr>(regPtr0->get(keyport)); - - ASSERT(obj2->equals(p1) == true, "Nested pdx objects should be equal"); - - LOG("PutAndVerifyNestedPdxInGet complete."); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, PutAndVerifyPdxInGFSInGet) - { - try { - Serializable::registerType( - PdxTestsAuto::PdxInsideIGeodeSerializable::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::NestedPdx::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes1::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes3::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes4::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes5::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes6::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes7::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes8::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxInsideIGeodeSerializablePtr np( - new PdxTestsAuto::PdxInsideIGeodeSerializable()); - - CacheableKeyPtr keyport = CacheableKey::create(1); - regPtr0->put(keyport, np); - - // GET - PdxTestsAuto::PdxInsideIGeodeSerializablePtr pRet = - dynCast<PdxTestsAuto::PdxInsideIGeodeSerializablePtr>( - regPtr0->get(keyport)); - ASSERT( - pRet->equals(np) == true, - "TASK PutAndVerifyPdxInIGFSInGet: PdxInsideIGeodeSerializable objects " - "should be equal"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, VerifyPdxInGFSGetOnly) - { - try { - Serializable::registerType( - PdxTestsAuto::PdxInsideIGeodeSerializable::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::NestedPdx::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes1::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes3::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes4::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes5::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes6::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes7::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes8::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - PdxTestsAuto::PdxInsideIGeodeSerializablePtr orig( - new PdxTestsAuto::PdxInsideIGeodeSerializable()); - - // GET - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxInsideIGeodeSerializablePtr pRet = - dynCast<PdxTestsAuto::PdxInsideIGeodeSerializablePtr>( - regPtr0->get(keyport)); - ASSERT(pRet->equals(orig) == true, - "TASK:VerifyPdxInIGFSGetOnly, PdxInsideIGeodeSerializable objects " - "should " - "be equal"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, VerifyNestedGetOnly) - { - LOG("VerifyNestedGetOnly started."); - - try { - Serializable::registerPdxType(NestedPdx::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes1::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - PdxTestsAuto::NestedPdxPtr p1(new PdxTestsAuto::NestedPdx()); - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - - PdxTestsAuto::NestedPdxPtr obj2 = - dynCast<PdxTestsAuto::NestedPdxPtr>(regPtr0->get(keyport)); - - ASSERT(obj2->equals(p1) == true, "Nested pdx objects should be equal"); - - LOG("VerifyNestedGetOnly complete."); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT2, VerifyGetOnly) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxType::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::Address::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxTypePtr obj2 = - dynCast<PdxTestsAuto::PdxTypePtr>(regPtr0->get(keyport)); - - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO("PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT(lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() < - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be less than Total " - "pdxSerializations."); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() < - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be less than Total " - "pdxSerializationsBytes."); - LOG("StepFour complete.\n"); - } -END_TASK_DEFINITION - -DUNIT_TASK_DEFINITION(CLIENT1, PutAndVerifyVariousPdxTypes) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes1::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes3::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes4::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes5::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes6::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes7::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes8::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes9::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes10::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - bool flag = false; - { - PdxTestsAuto::PdxTypes1Ptr p1(new PdxTestsAuto::PdxTypes1()); - CacheableKeyPtr keyport = CacheableKey::create(11); - regPtr0->put(keyport, p1); - PdxTestsAuto::PdxTypes1Ptr pRet = - dynCast<PdxTestsAuto::PdxTypes1Ptr>(regPtr0->get(keyport)); - - flag = p1->equals(pRet); - LOGDEBUG("PutAndVerifyVariousPdxTypes:.. flag = %d", flag); - ASSERT(flag == true, - "Objects of type PdxTestsAuto::PdxTypes1 should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() == - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be equal to Total " - "pdxSerializations."); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() == - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be equal to Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes2Ptr p2(new PdxTestsAuto::PdxTypes2()); - CacheableKeyPtr keyport2 = CacheableKey::create(12); - regPtr0->put(keyport2, p2); - PdxTestsAuto::PdxTypes2Ptr pRet2 = - dynCast<PdxTestsAuto::PdxTypes2Ptr>(regPtr0->get(keyport2)); - - flag = p2->equals(pRet2); - LOGDEBUG("PutAndVerifyVariousPdxTypes:.. flag = %d", flag); - ASSERT(flag == true, - "Objects of type PdxTestsAuto::PdxTypes2 should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() == - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be equal to Total " - "pdxSerializations."); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() == - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be equal to Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes3Ptr p3(new PdxTestsAuto::PdxTypes3()); - CacheableKeyPtr keyport3 = CacheableKey::create(13); - regPtr0->put(keyport3, p3); - PdxTestsAuto::PdxTypes3Ptr pRet3 = - dynCast<PdxTestsAuto::PdxTypes3Ptr>(regPtr0->get(keyport3)); - - flag = p3->equals(pRet3); - LOGDEBUG("PutAndVerifyVariousPdxTypes:.. flag = %d", flag); - ASSERT(flag == true, - "Objects of type PdxTestsAuto::PdxTypes3 should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() == - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be equal to Total " - "pdxSerializations."); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() == - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be equal to Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes4Ptr p4(new PdxTestsAuto::PdxTypes4()); - CacheableKeyPtr keyport4 = CacheableKey::create(14); - regPtr0->put(keyport4, p4); - PdxTestsAuto::PdxTypes4Ptr pRet4 = - dynCast<PdxTestsAuto::PdxTypes4Ptr>(regPtr0->get(keyport4)); - - flag = p4->equals(pRet4); - LOGDEBUG("PutAndVerifyVariousPdxTypes:.. flag = %d", flag); - ASSERT(flag == true, - "Objects of type PdxTestsAuto::PdxTypes4 should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() == - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be equal to Total " - "pdxSerializations."); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() == - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be equal to Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes5Ptr p5(new PdxTestsAuto::PdxTypes5()); - CacheableKeyPtr keyport5 = CacheableKey::create(15); - regPtr0->put(keyport5, p5); - PdxTestsAuto::PdxTypes5Ptr pRet5 = - dynCast<PdxTestsAuto::PdxTypes5Ptr>(regPtr0->get(keyport5)); - - flag = p5->equals(pRet5); - LOGDEBUG("PutAndVerifyVariousPdxTypes:.. flag = %d", flag); - ASSERT(flag == true, - "Objects of type PdxTestsAuto::PdxTypes5 should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() == - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be equal to Total " - "pdxSerializations."); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() == - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be equal to Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes6Ptr p6(new PdxTestsAuto::PdxTypes6()); - CacheableKeyPtr keyport6 = CacheableKey::create(16); - regPtr0->put(keyport6, p6); - PdxTestsAuto::PdxTypes6Ptr pRet6 = - dynCast<PdxTestsAuto::PdxTypes6Ptr>(regPtr0->get(keyport6)); - - flag = p6->equals(pRet6); - LOGDEBUG("PutAndVerifyVariousPdxTypes:.. flag = %d", flag); - ASSERT(flag == true, - "Objects of type PdxTestsAuto::PdxTypes6 should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() == - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be equal to Total " - "pdxSerializations."); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() == - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be equal to Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes7Ptr p7(new PdxTestsAuto::PdxTypes7()); - CacheableKeyPtr keyport7 = CacheableKey::create(17); - regPtr0->put(keyport7, p7); - PdxTestsAuto::PdxTypes7Ptr pRet7 = - dynCast<PdxTestsAuto::PdxTypes7Ptr>(regPtr0->get(keyport7)); - - flag = p7->equals(pRet7); - LOGDEBUG("PutAndVerifyVariousPdxTypes:.. flag = %d", flag); - ASSERT(flag == true, - "Objects of type PdxTestsAuto::PdxTypes7 should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() == - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be equal to Total " - "pdxSerializations."); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() == - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be equal to Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes8Ptr p8(new PdxTestsAuto::PdxTypes8()); - CacheableKeyPtr keyport8 = CacheableKey::create(18); - regPtr0->put(keyport8, p8); - PdxTestsAuto::PdxTypes8Ptr pRet8 = - dynCast<PdxTestsAuto::PdxTypes8Ptr>(regPtr0->get(keyport8)); - - flag = p8->equals(pRet8); - LOGDEBUG("PutAndVerifyVariousPdxTypes:.. flag = %d", flag); - ASSERT(flag == true, - "Objects of type PdxTestsAuto::PdxTypes8 should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() == - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be equal to Total " - "pdxSerializations."); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() == - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be equal to Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes9Ptr p9(new PdxTestsAuto::PdxTypes9()); - CacheableKeyPtr keyport9 = CacheableKey::create(19); - regPtr0->put(keyport9, p9); - PdxTestsAuto::PdxTypes9Ptr pRet9 = - dynCast<PdxTestsAuto::PdxTypes9Ptr>(regPtr0->get(keyport9)); - - flag = p9->equals(pRet9); - LOGDEBUG("PutAndVerifyVariousPdxTypes:.. flag = %d", flag); - ASSERT(flag == true, - "Objects of type PdxTestsAuto::PdxTypes9 should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() == - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be equal to Total " - "pdxSerializations."); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() == - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be equal to Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes10Ptr p10(new PdxTestsAuto::PdxTypes10()); - CacheableKeyPtr keyport10 = CacheableKey::create(20); - regPtr0->put(keyport10, p10); - PdxTestsAuto::PdxTypes10Ptr pRet10 = - dynCast<PdxTestsAuto::PdxTypes10Ptr>(regPtr0->get(keyport10)); - - flag = p10->equals(pRet10); - LOGDEBUG("PutAndVerifyVariousPdxTypes:.. flag = %d", flag); - ASSERT(flag == true, - "Objects of type PdxTestsAuto::PdxTypes10 should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() == - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be equal to Total " - "pdxSerializations."); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() == - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be equal to Total " - "pdxSerializationsBytes."); - } - - LOG("NIL:329:StepFive complete.\n"); - } -END_TASK_DEFINITION - -////TestCase-2 -////c1.client1PutsV1Object -DUNIT_TASK_DEFINITION(CLIENT1, client1PutsV1Object) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxType3V1::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - - PdxTestsAuto::PdxType3V1::reset(false); - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxType3V1Ptr np(new PdxTestsAuto::PdxType3V1()); - - regPtr0->put(keyport, np); - } -END_TASK_DEFINITION -////c2.client2GetsV1ObjectAndPutsV2Object -DUNIT_TASK_DEFINITION(CLIENT2, client2GetsV1ObjectAndPutsV2Object) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes3V2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - PdxTestsAuto::PdxTypes3V2::reset(false); - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - - // get v1 object - CacheableKeyPtr keyport = CacheableKey::create(1); - PdxTestsAuto::PdxTypes3V2Ptr pRet = - dynCast<PdxTestsAuto::PdxTypes3V2Ptr>(regPtr0->get(keyport)); - - // now put v2 object - PdxTestsAuto::PdxTypes3V2Ptr np(new PdxTestsAuto::PdxTypes3V2()); - regPtr0->put(keyport, np); - - LOGDEBUG("Task:client2GetsV1ObjectAndPutsV2Object Done successfully "); - } -END_TASK_DEFINITION -// c3.client3GetsV2Object -DUNIT_TASK_DEFINITION(CLIENT3, client3GetsV2Object) - { - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - CacheablePtr args = CacheableKey::create("compareDotNETPdxTypes"); - CacheableKeyPtr key = CacheableKey::create(1); - CacheableVectorPtr routingObj = CacheableVector::create(); - routingObj->push_back(key); - - ExecutionPtr funcExec = FunctionService::onRegion(regPtr0); - - ResultCollectorPtr collector = funcExec->execute("IterateRegion", true); - ASSERT(collector != NULLPTR, "onRegion collector NULL"); - - CacheableVectorPtr result = collector->getResult(); - LOGINFO("NIL:: testTCPDXTests:verifyDotNetPdxTypes result->size = %d ", - result->size()); - if (result == NULLPTR) { - ASSERT(false, "echo String : result is NULL"); - } else { - bool gotResult = false; - for (int i = 0; i < result->size(); i++) { - try { - CacheableBooleanPtr boolValue = - dynCast<CacheableBooleanPtr>(result->operator[](i)); - LOGINFO("NIL::verifyDotNetPdxTypes boolValue is %d ", - boolValue->value()); - bool resultVal = boolValue->value(); - ASSERT(resultVal == true, - "Function should return true NIL LINE_1508"); - gotResult = true; - } catch (ClassCastException& ex) { - LOG("exFuncNameSendException casting to int for arrayList arguement " - "exception."); - std::string logmsg = ""; - logmsg += ex.getName(); - logmsg += ": "; - logmsg += ex.getMessage(); - LOG(logmsg.c_str()); - ex.printStackTrace(); - LOG("exFuncNameSendException now casting to " - "UserFunctionExecutionExceptionPtr for arrayList arguement " - "exception."); - UserFunctionExecutionExceptionPtr uFEPtr = - dynCast<UserFunctionExecutionExceptionPtr>(result->operator[](i)); - ASSERT(uFEPtr != NULLPTR, "uFEPtr exception is NULL"); - LOGINFO("Done casting to uFEPtr"); - LOGINFO("Read expected uFEPtr exception %s ", - uFEPtr->getMessage()->asChar()); - } catch (...) { - FAIL( - "exFuncNameSendException casting to string for bool arguement " - "Unknown exception."); - } - } - ASSERT(gotResult == true, "Function should (gotResult) return true "); - } - } -END_TASK_DEFINITION -// END TestCase-2 - -DUNIT_TASK_DEFINITION(CLIENT2, VerifyVariousPdxGets) - { - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes1::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes2::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes3::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes4::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes5::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes6::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes7::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes8::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes9::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - try { - Serializable::registerPdxType( - PdxTestsAuto::PdxTypes10::createDeserializable); - } catch (const IllegalStateException&) { - // ignore exception - } - // TODO::Uncomment it once PortfolioPdx/PositionPdx Classes are ready - // Serializable::registerPdxType(PdxTestsAuto.PortfolioPdx.CreateDeserializable); - // Serializable::registerPdxType(PdxTestsAuto.PositionPdx.CreateDeserializable); - - RegionPtr regPtr0 = getHelper()->getRegion("DistRegionAck"); - bool flag = false; - { - PdxTestsAuto::PdxTypes1Ptr p1(new PdxTestsAuto::PdxTypes1()); - CacheableKeyPtr keyport = CacheableKey::create(11); - PdxTestsAuto::PdxTypes1Ptr pRet = - dynCast<PdxTestsAuto::PdxTypes1Ptr>(regPtr0->get(keyport)); - - flag = p1->equals(pRet); - LOGDEBUG("VerifyVariousPdxGets:.. flag = %d", flag); - ASSERT(flag == true, - "VerifyVariousPdxGets:Objects of type PdxTestsAuto::PdxTypes1 " - "should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() < - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be less than Total " - "pdxSerializations."); - ASSERT(lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() < - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be less than Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes2Ptr p2(new PdxTestsAuto::PdxTypes2()); - CacheableKeyPtr keyport2 = CacheableKey::create(12); - PdxTestsAuto::PdxTypes2Ptr pRet2 = - dynCast<PdxTestsAuto::PdxTypes2Ptr>(regPtr0->get(keyport2)); - - flag = p2->equals(pRet2); - LOGDEBUG("VerifyVariousPdxGets:. flag = %d", flag); - ASSERT(flag == true, - "VerifyVariousPdxGets:Objects of type PdxTestsAuto::PdxTypes2 " - "should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() < - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be less than Total " - "pdxSerializations."); - ASSERT(lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() < - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be less than Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes3Ptr p3(new PdxTestsAuto::PdxTypes3()); - CacheableKeyPtr keyport3 = CacheableKey::create(13); - PdxTestsAuto::PdxTypes3Ptr pRet3 = - dynCast<PdxTestsAuto::PdxTypes3Ptr>(regPtr0->get(keyport3)); - - flag = p3->equals(pRet3); - LOGDEBUG("VerifyVariousPdxGets:.. flag = %d", flag); - ASSERT(flag == true, - "VerifyVariousPdxGets:Objects of type PdxTestsAuto::PdxTypes3 " - "should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() < - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be less than Total " - "pdxSerializations."); - ASSERT(lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() < - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be less than Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes4Ptr p4(new PdxTestsAuto::PdxTypes4()); - CacheableKeyPtr keyport4 = CacheableKey::create(14); - PdxTestsAuto::PdxTypes4Ptr pRet4 = - dynCast<PdxTestsAuto::PdxTypes4Ptr>(regPtr0->get(keyport4)); - - flag = p4->equals(pRet4); - LOGDEBUG("VerifyVariousPdxGets:.. flag = %d", flag); - ASSERT(flag == true, - "VerifyVariousPdxGets:Objects of type PdxTestsAuto::PdxTypes4 " - "should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() < - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be less than Total " - "pdxSerializations."); - ASSERT(lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() < - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be less than Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes5Ptr p5(new PdxTestsAuto::PdxTypes5()); - CacheableKeyPtr keyport5 = CacheableKey::create(15); - PdxTestsAuto::PdxTypes5Ptr pRet5 = - dynCast<PdxTestsAuto::PdxTypes5Ptr>(regPtr0->get(keyport5)); - - flag = p5->equals(pRet5); - LOGDEBUG("VerifyVariousPdxGets:.. flag = %d", flag); - ASSERT(flag == true, - "VerifyVariousPdxGets:Objects of type PdxTestsAuto::PdxTypes5 " - "should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() < - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be less than Total " - "pdxSerializations."); - ASSERT(lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() < - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be less than Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes6Ptr p6(new PdxTestsAuto::PdxTypes6()); - CacheableKeyPtr keyport6 = CacheableKey::create(16); - PdxTestsAuto::PdxTypes6Ptr pRet6 = - dynCast<PdxTestsAuto::PdxTypes6Ptr>(regPtr0->get(keyport6)); - - flag = p6->equals(pRet6); - LOGDEBUG("VerifyVariousPdxGets:.. flag = %d", flag); - ASSERT(flag == true, - "VerifyVariousPdxGets:Objects of type PdxTestsAuto::PdxTypes6 " - "should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() < - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be less than Total " - "pdxSerializations."); - ASSERT(lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() < - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be less than Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes7Ptr p7(new PdxTestsAuto::PdxTypes7()); - CacheableKeyPtr keyport7 = CacheableKey::create(17); - PdxTestsAuto::PdxTypes7Ptr pRet7 = - dynCast<PdxTestsAuto::PdxTypes7Ptr>(regPtr0->get(keyport7)); - - flag = p7->equals(pRet7); - LOGDEBUG("VerifyVariousPdxGets:.. flag = %d", flag); - ASSERT(flag == true, - "VerifyVariousPdxGets:Objects of type PdxTestsAuto::PdxTypes7 " - "should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() < - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be less than Total " - "pdxSerializations."); - ASSERT(lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() < - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be less than Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes8Ptr p8(new PdxTestsAuto::PdxTypes8()); - CacheableKeyPtr keyport8 = CacheableKey::create(18); - PdxTestsAuto::PdxTypes8Ptr pRet8 = - dynCast<PdxTestsAuto::PdxTypes8Ptr>(regPtr0->get(keyport8)); - - flag = p8->equals(pRet8); - LOGDEBUG("VerifyVariousPdxGets:.. flag = %d", flag); - ASSERT(flag == true, - "VerifyVariousPdxGets:Objects of type PdxTestsAuto::PdxTypes8 " - "should be equal"); - checkPdxInstanceToStringAtServer(regPtr0); - - LocalRegion* lregPtr = (dynamic_cast<LocalRegion*>(regPtr0.ptr())); - LOGINFO("PdxSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations()); - LOGINFO("PdxDeSerializations = %d ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations()); - LOGINFO( - "PdxSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes()); - LOGINFO( - "PdxDeSerializationBytes = %ld ", - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializationBytes()); - ASSERT( - lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializations() < - lregPtr->getCacheImpl()->m_cacheStats->getPdxDeSerializations(), - "Total pdxDeserializations should be less than Total " - "pdxSerializations."); - ASSERT(lregPtr->getCacheImpl()->m_cacheStats->getPdxSerializationBytes() < - lregPtr->getCacheImpl() - ->m_cacheStats->getPdxDeSerializationBytes(), - "Total pdxDeserializationBytes should be less than Total " - "pdxSerializationsBytes."); - } - - { - PdxTestsAuto::PdxTypes9Ptr p9(new PdxTestsAuto::PdxTypes9()); - CacheableKeyPtr keyport9 = CacheableKey::create(19); - PdxTestsAuto::PdxTypes9Ptr pRet9 = - dynCast<PdxTestsAuto::PdxTypes9Ptr>(regPtr0->get(keyport9)); - - flag = p9->equals(pRet9); - LOGDEBUG("VerifyVariousPdxGets:. flag = %d", flag); - ASSERT(flag == true, - "VerifyVariousPdxGets:Objects of type PdxTestsAuto::PdxTypes9 " - "shou
<TRUNCATED> http://git-wip-us.apache.org/repos/asf/geode-native/blob/7c7f73cc/src/dependencies/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/src/dependencies/CMakeLists.txt b/src/dependencies/CMakeLists.txt index ef106e5..bd162c0 100644 --- a/src/dependencies/CMakeLists.txt +++ b/src/dependencies/CMakeLists.txt @@ -23,7 +23,6 @@ set ( DEPENDENCIES xerces-c openssl ACE - antlr sqlite doxygen gtest
