public class FixedPartitioningDUnitTest extends FixedPartitioningTestBase
FixedPartitioningTestBase.Months_Accessor, FixedPartitioningTestBase.Months_DataStore, FixedPartitioningTestBase.Q1_Months, FixedPartitioningTestBase.Q2_Months, FixedPartitioningTestBase.Q3_Months, FixedPartitioningTestBase.Q4_MonthsDistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2member1, member2, member3, member4, Quarter1, Quarter2, Quarter3, Quarter4, redundantCopies, region_FPRlogPerTest, reconnect, system, testName| Constructor and Description |
|---|
FixedPartitioningDUnitTest(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
setUp()
Sets up the test (noop).
|
void |
tearDown2()
Tears down the test.
|
void |
test_Bug46619_Put_ValidateDataOnMember_PrimarySecondary_Datastore_CacheClosed() |
void |
test_DataStoreWithoutPartition_DataStoreWithPartition()
This test validates that if one datastore has the fixed partition
attributes defined then other datastore should also have the fixed
partition attributes defined
|
void |
test_DataStoreWithPartition_DataStoreWithoutPartition()
This test validates that if one datastore has the fixed partition
attributes defined then other datastore should also have the fixed
partition attributes defined
|
void |
testBug43283() |
void |
testDelete_WithoutPut()
This test validate that a delete operation on empty region will throw
EntryNotFoundException
|
void |
testFixedPartitionAttributes_Accessor()
This test validates that FixedPartitionAttributes cannot be defined for
accessor nodes
|
void |
testFPR_DefaultNumBuckets()
This tests validate that datastore member tries the put on itself as well
as other datastores as per primary FixedPartitionAttributes defined on
datastores with only one bucket per partition.
|
void |
testNullPartitionName()
This test validates that null partition name cannot be added in
FixedPartitionAttributes
|
void |
testNumberOfPartitions()
Number of primary partitions (which should be one for a partition) and
secondary partitions of a FPR for a partition should never exceed number of
redundant copies + 1.
|
void |
testNumBuckets_totalNumBuckets()
Sum of num-buckets for different primary partitions should not be
greater than totalNumBuckets.
|
void |
testPut_CallBackWithResolver()
This tests validate that datastore member tries the put with callback on itself as well as
other datastores as per primary FixedPartitionAttributes defined on
datastores.
|
void |
testPut_FixedPartitionResolver_NoResolver()
This tests validate that datastore member tries the put on itself as well
as other datastores as per primary FixedPartitionAttributes defined on
datastores.
|
void |
testPut_FixedPartitionResolver_PartitionResolver()
This tests validate that datastore member tries the put on itself as well
as other datastores as per primary FixedPartitionAttributes defined on
datastores.
|
void |
testPut_NoResolver()
This tests validate that datastore member tries the put on itself as well as
other datastores as per primary FixedPartitionAttributes defined on
datastores.
|
void |
testPut_PartitionNotAvailableException()
This test validates that if the required partition is not available at the
time of entry operation then PartitionNotAvailabelException is thrown
|
void |
testPut_ValidateDataOnMember_MultiplePrimaries_Datastore_CacheClosed()
Datastore = 4
Datastores Primary Secondary
Member1 = Q1(0,1,2) Q2(3,4,5),Q3(6,7,8),Q4(9,10,11)
Member2 = Q3(6,7,8) Q1(0,1,2), Q2(3,4,5),Q4(9,10,11)
Member3 = Q2(3,4,5),Q4(9,10,11) Q1(0,1,2), Q3(6,7,8)
Put happens for all buckets
Member 3 goes down, then either member1 or member2 holds primary for member4
Primary Secondary
Member1 = Q1(0,1,2),Q2(3,4,5) Q3(6,7,8), Q4(9,10,11)
Member2 = Q3(6,7,8),Q4(9,10,11) Q1(0,1,2), Q2(3,4,5)
Member 3 comes again then it should be same as it was before member 3 went down
Member1 = Q1(0,1,2) Q2(3,4,5),Q3(6,7,8),Q4(9,10,11)
Member2 = Q3(6,7,8) Q1(0,1,2), Q2(3,4,5),Q4(9,10,11)
Member3 = Q2(3,4,5),Q4(9,10,11) Q1(0,1,2), Q3(6,7,8)
|
void |
testPut_ValidateDataOnMember_OnlyPrimary_Accessor()
This tests validate that accessor member does the put on datastores as per
primary FixedPartitionAttributes defined on datastores
|
void |
testPut_ValidateDataOnMember_OnlyPrimary_Datastore()
This tests validate that datastore member does the put on itself as well as
other datastores as per primary FixedPartitionAttributes defined on
datastores.
|
void |
testPut_ValidateDataOnMember_OnlySecondary_Datastore()
This tests validate that if only the secondary partitions are available
then put should happen successfully for these secondary partitions.
|
void |
testPut_ValidateDataOnMember_PrimarySecondary_Accessor_CacheClosed()
Accessor =1 Datastore = 4
Datastores Primary Secondary
Member1 = Q1(0,1,2) Q3(3,4,5), Q4(6,7,8)
Member2 = Q2(9,10,11) Q3(3,4,5), Q4(6,7,8)
Member3 = Q3(3,4,5) Q1(0,1,2), Q2(9,10,11)
Member4 = Q4(6,7,8) Q1(0,1,2), Q2(9,10,11)
Put happens for all buckets
Member 4 goes down, then either member1 or member2 holds primary for member4
Primary Secondary
Member1 = Q1(0,1,2) Q3(3,4,5), Q4(6,7,8)
Member2 = Q2(9,10,11), Q4(6,7,8) Q3(3,4,5)
Member3 = Q3(3,4,5) Q1(0,1,2), Q2(9,10,11)
Put happens considering Member2 is holding primary for Q4.
|
void |
testPut_ValidateDataOnMember_PrimarySecondary_Accessor()
This tests validate that accessor member does the put on datastores as per
primary and secondary FixedPartitionAttributes defined on datastores.
|
void |
testPut_ValidateDataOnMember_PrimarySecondary_Datastore_CacheClosed()
Datastore = 4
Datastores Primary Secondary
Member1 = Q1(0,1,2) Q2(3,4,5)
Member2 = Q2(3,4,5) Q3(6,7,8)
Member3 = Q3(6,7,8) Q4(9,10,11)
Member4 = Q4(9,10,11) Q1(0,1,2)
Put happens for all buckets
Member 4 goes down, then either member1 or member2 holds primary for member4
Primary Secondary
Member1 = Q1(0,1,2) Q2(3,4,5)
Member2 = Q2(3,4,5) Q3(6,7,8)
Member3 = Q3(6,7,8), Q4(9,10,11)
Put happens considering Member3 is holding primary for Q4.
|
void |
testPut_ValidateDataOnMember_PrimarySecondary_Datastore()
This tests validate that datastore member does the put on itself as well as
other datastores as per primary and secondary FixedPartitionAttributes defined on
datastores.
|
void |
testPut_WithResolver_NoFPAs()
This test validates that a PR without Fixed Partition Attributes and with
FixedPartitionResolver will do custom partitioning as per resolver.
|
void |
testSamePartitionName_DifferentNumBuckets()
Test validation : if same partition is having different num-buckets across
the nodes then illegalStateException will be thrown
|
void |
testSamePartitionName_Primary_OnTwoMembers()
Test validation : only one node should return primary for a particular
partition name for a specific FPR at any given point of time.
|
void |
testSamePartitionNameTwice()
This tests validate that same partition name cannot be added more than once
as primary as well as secondary on same member.
|
assertFALSE_Q1, assertFALSE_Q2, assertFALSE_Q3, assertFALSE_Q4, assertTRUE_Q1, assertTRUE_Q2, assertTRUE_Q3, assertTRUE_Q4, checkFPR, checkPrimaryBucketsForColocation, checkPrimaryBucketsForColocationAfterCacheClosed, checkPrimaryBucketsForCustomer, checkPrimaryBucketsForQuarter, checkPrimaryBucketsForQuarterAfterCacheClosed, checkPrimaryData, checkPrimaryDataPersistence, checkPrimarySecondaryData_TwoSecondaries, checkPrimarySecondaryData, checkStartingBucketIDs_Nodedown, checkStartingBucketIDs_Nodeup, checkStartingBucketIDs, cleanDiskDirs, closeCache, createCacheOnMember_DisableMovePrimary, createCacheOnMember, createOutOfRangePrimaryBucketUsingPartitionManager, createPrimaryBucketsBelongingToOtherPartition, createPrimaryBucketsBelongingToThisPartition, createRegionWithPartitionAttributes, deleteOperation, doRebalance, getDiskDirs, getForColocation, getForQuarter, getThroughDataStore, putCustomerPartitionedRegion_Persistence, putCustomerPartitionedRegion_Persistence1, putCustomerPartitionedRegion_Persistence2, putCustomerPartitionedRegion, putForQuarter, putHAData, putOperation, putOrderPartitionedRegion_Persistence, putOrderPartitionedRegion_Persistence1, putOrderPartitionedRegion_Persistence2, putOrderPartitionedRegion, putShipmentPartitionedRegion_Persistence, putShipmentPartitionedRegion_Persistence1, putShipmentPartitionedRegion_Persistence2, putShipmentPartitionedRegion, putThorughAccessor_Immediate, putThorughAccessor, putThroughDataStore_CallBackWithResolver, putThroughDataStore_FixedPartitionResolver_NoResolver, putThroughDataStore_FixedPartitionResolver_PartitionResolver, putThroughDataStore_NoResolver, putThroughDataStore, remoteTearDown, resetPRObserverBeforeCalculateStartingBucketId, setPRObserverBeforeCalculateStartingBucketId, validateAfterPutPartitionedRegionaddExpectedException, addExpectedException, addHydraProperties, attachDebugger, checkBBFlag, cleanupAllVms, clearBBFlag, crashDistributedSystem, crashDistributedSystem, createLogWriter, disconnectAllFromDS, disconnectFromDS, dumpAllStacks, dumpMyThreads, dumpStack, dumpStack, dumpStack, dumpStackTrace, fail, getAllDistributedSystemProperties, getDistributedSystemProperties, getDUnitLocatorAddress, getDUnitLocatorPort, getDUnitLocatorString, getDUnitLogLevel, getIPLiteral, getLogWriter, getLonerSystem, getMcastSystem, getMcastSystem, getRepeatTimeoutMs, getServerHostName, getSystem, getSystem, getTestClass, getTestName, getUniqueName, getVMCount, incBBFlag, invokeInEveryVM, invokeInEveryVM, invokeInEveryVM, invokeInEveryVM, invokeInEveryVMRepeatingIfNecessary, invokeInLocator, invokeRepeatingIfNecessary, isConnectedToDS, join, noteTiming, pause, pause, perVMSetUp, realTearDown, setDiskStoreForGateway, setSystem, setTestName, staticPause, tearDown, unregisterAllDataSerializersFromAllVms, unregisterDataSerializerInThisVM, unregisterInstantiatorsInThisVM, waitForBBFlag, waitForCriterion, waitMutexassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toStringpublic FixedPartitioningDUnitTest(String name)
public void setUp()
throws Exception
DistributedTestCasesetUp in class DistributedTestCaseExceptionpublic void tearDown2()
throws Exception
DistributedTestCaseDistributedTestCase.tearDown() method, and should be over ridden in its place.tearDown2 in class FixedPartitioningTestBaseExceptionpublic void testNullPartitionName()
public void testSamePartitionNameTwice()
public void testFixedPartitionAttributes_Accessor()
public void testSamePartitionName_Primary_OnTwoMembers()
public void testSamePartitionName_DifferentNumBuckets()
public void testNumberOfPartitions()
public void testNumBuckets_totalNumBuckets()
public void testPut_PartitionNotAvailableException()
public void test_DataStoreWithoutPartition_DataStoreWithPartition()
public void test_DataStoreWithPartition_DataStoreWithoutPartition()
public void testPut_ValidateDataOnMember_OnlyPrimary_Accessor()
public void testBug43283()
public void testPut_ValidateDataOnMember_OnlyPrimary_Datastore()
public void testDelete_WithoutPut()
public void testPut_NoResolver()
public void testPut_CallBackWithResolver()
public void testPut_WithResolver_NoFPAs()
public void testPut_FixedPartitionResolver_NoResolver()
public void testPut_FixedPartitionResolver_PartitionResolver()
public void testFPR_DefaultNumBuckets()
public void testPut_ValidateDataOnMember_PrimarySecondary_Accessor()
public void testPut_ValidateDataOnMember_PrimarySecondary_Datastore()
public void testPut_ValidateDataOnMember_OnlySecondary_Datastore()
public void testPut_ValidateDataOnMember_PrimarySecondary_Accessor_CacheClosed()
public void testPut_ValidateDataOnMember_PrimarySecondary_Datastore_CacheClosed()
public void test_Bug46619_Put_ValidateDataOnMember_PrimarySecondary_Datastore_CacheClosed()
public void testPut_ValidateDataOnMember_MultiplePrimaries_Datastore_CacheClosed()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.