public class LocatorTest extends DistributedTestCase
Locator API to start and stop
locators running in remote VMs.DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2logPerTest, reconnect, system, testName| Constructor and Description |
|---|
LocatorTest(java.lang.String name)
Creates a new
LocatorTest |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
anyNormalFDDisconnects() |
void |
DISABLED_BUG51468testBug30341()
Bug 30341 concerns race conditions in JGroups that allow two locators to start up in a
split-brain configuration.
|
static com.gemstone.gemfire.distributed.DistributedMember |
getDistributedMember(java.util.Properties props)
return the distributed member id for the ds on this vm
|
static com.gemstone.gemfire.distributed.DistributedMember |
getLeadMember()
find the lead member and return its id
|
static com.gemstone.gemfire.distributed.DistributedMember |
getLocatorDistributedMember()
find a running locator and return its distributed member id
|
static boolean |
isSystemConnected() |
protected void |
nukeJChannel(com.gemstone.gemfire.distributed.DistributedSystem sys) |
static void |
resetRefreshWait()
remove shortened locator refresh rate
|
static void |
setShortRefreshWait()
set a short locator refresh rate
|
void |
setUp()
Sets up the test (noop).
|
void |
tearDown2()
Tears down the test.
|
void |
testCollocatedLocatorWithSecurity()
GemFireXD uses a colocated locator in a dm-type=normal VM.
|
void |
testConnectToOwnLocator()
Tests that a VM can connect to a locator that is hosted in its
own VM.
|
void |
testForceDisconnectAndPeerShutdownCause()
test lead member failure and normal coordinator shutdown with network partition detection
enabled.
|
void |
testHostingMultipleLocators()
Tests that a single VM can NOT host multiple locators
|
void |
testLeadAndCoordFailure()
test lead member and coordinator failure with network partition detection
enabled.
|
void |
testLeadFailureAndCoordShutdown()
test lead member failure and normal coordinator shutdown with network partition detection
enabled.
|
void |
testLeadMemberSelection()
test lead member selection
|
void |
testLeadShutdownAndCoordFailure()
test lead member shutdown and coordinator crashing with network partition detection
enabled.
|
void |
testLocatorForcesDetection()
Tests that a VM cannot connect if the locator has a different
enable-network-partition-detection setting
|
void |
testMultipleLocators()
Tests starting multiple locators in multiple VMs.
|
void |
testMultipleMcastLocators()
Tests starting multiple locators in multiple VMs.
|
void |
testNoLocator()
Tests that attempting to connect to a distributed system in which
no locator is defined throws an exception.
|
void |
testOneLocator()
Tests starting one locator in a remote VM and having multiple
members of the distributed system join it.
|
void |
testOneStoppedLocator()
Tests starting one locator in a remote VM and having multiple
members of the distributed system join it.
|
void |
testQuorumLossNotification()
this is very similar to testLeadAndCoordFailure but forced-disconnects aren't
generated.
|
void |
testRestartLocator()
Tests starting, stopping, and restarting a locator.
|
static boolean |
waitUntilFDConnected(long timeout) |
addExpectedException, 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 void setUp()
DistributedTestCasesetUp in class DistributedTestCasepublic void tearDown2()
DistributedTestCaseDistributedTestCase.tearDown() method, and should be over ridden in its place.tearDown2 in class DistributedTestCasepublic void testCollocatedLocatorWithSecurity()
throws java.lang.Exception
java.lang.Exceptionpublic void DISABLED_BUG51468testBug30341()
throws java.lang.Exception
java.lang.Exceptionpublic void testLeadMemberSelection()
throws java.lang.Exception
java.lang.Exceptionpublic void testLeadAndCoordFailure()
throws java.lang.Exception
So, we start two locators with admin distributed systems, then start two regular distributed members.
We kill the second locator (which is not the view coordinator) and then kill the non-lead member. That should be okay - the lead and remaining locator continue to run.
We then kill the lead member and demonstrate that the original locator (which is now the sole remaining member) shuts itself down.
java.lang.Exceptionpublic void testQuorumLossNotification()
throws java.lang.Exception
we start two locators with admin distributed systems, then start two regular distributed members.
We kill the second locator (which is not the view coordinator) and then kill the non-lead member. That should be okay - the lead and remaining locator continue to run.
We then kill the lead member and demonstrate that the original locator (which is now the sole remaining member) notifies listeners.
java.lang.Exceptionpublic void testLeadFailureAndCoordShutdown()
throws java.lang.Exception
Start two locators with admin distributed systems, then start two regular distributed members.
We kill the lead member and demonstrate that the other members continue to operate normally.
We then shut down the group coordinator and observe the second locator pick up the job and the remaining member continues to operate normally.
java.lang.Exceptionpublic void testForceDisconnectAndPeerShutdownCause()
throws java.lang.Exception
Start one locators with admin distributed systems, then start two regular distributed members.
We kill the lead member and demonstrate that the other members continue to operate normally.
We then shut down the group coordinator and observe the second locator pick up the job and the remaining member continues to operate normally.
java.lang.Exceptionpublic void testLeadShutdownAndCoordFailure()
throws java.lang.Exception
Start two locators with admin distributed systems, then start two regular distributed members.
We kill the coordinator and shut down the lead member and observe the second locator pick up the job and the remaining member continue to operate normally.
java.lang.Exceptionpublic void testNoLocator()
public void testOneLocator()
throws java.lang.Exception
java.lang.Exceptionpublic void testOneStoppedLocator()
throws java.lang.Exception
java.lang.Exceptionpublic static void setShortRefreshWait()
public static void resetRefreshWait()
public static boolean isSystemConnected()
public static boolean anyNormalFDDisconnects()
public static boolean waitUntilFDConnected(long timeout)
public void testMultipleLocators()
throws java.lang.Exception
java.lang.Exceptionpublic void testMultipleMcastLocators()
throws java.lang.Exception
java.lang.Exceptionpublic void testConnectToOwnLocator()
throws java.lang.Exception
java.lang.Exceptionpublic void testLocatorForcesDetection()
throws java.lang.Exception
java.lang.Exceptionpublic void testHostingMultipleLocators()
throws java.lang.Exception
java.lang.Exceptionpublic void testRestartLocator()
throws java.lang.Exception
java.lang.Exceptionpublic static com.gemstone.gemfire.distributed.DistributedMember getDistributedMember(java.util.Properties props)
public static com.gemstone.gemfire.distributed.DistributedMember getLocatorDistributedMember()
public static com.gemstone.gemfire.distributed.DistributedMember getLeadMember()
protected void nukeJChannel(com.gemstone.gemfire.distributed.DistributedSystem sys)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.