public class ReplicaSetAcceptanceTest extends BasicAcceptanceTestCases
BasicAcceptanceTestCases.DocumentCallbackGEO_TEST_COLLECTION_NAME, GRIDFS_COLLECTION_ROOT_NAME, LARGE_COLLECTION_COUNT, myCollection, myConfig, myDb, myGeoCollection, myGeoSphereCollection, myMongo, myRandom, ourUniqueId, SMALL_COLLECTION_COUNT, TEST_COLLECTION_NAME, TEST_DB_NAMEADMIN_USER_NAME, DEFAULT_PORT, ourClusterTestSupport, PASSWORD, USER_DB, USER_NAME| Constructor and Description |
|---|
ReplicaSetAcceptanceTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Sets up to create a connection to MongoDB.
|
protected boolean |
isReplicaSetConfiguration()
Returns true when running against a replica set configuration (may be
shards of replica sets.
|
static void |
startServer()
Starts the sharded server before the tests.
|
static void |
stopServer()
Stops the servers running in a sharded mode.
|
void |
testGracefulStepdownRecovery()
Tests recovery from a graceful step-down of a server.
|
void |
testSecondaryPreferredLoading()
Tests that using the secondary preferred read preference submits queries
to secondaries.
|
void |
testStillQuerySecondariesWhenNoPrimary()
Test recovery from a sudden server failure.
|
void |
testSuddenFailureRecovery()
Test recovery from a sudden server failure.
|
buildLargeCollection, createAddress, disableBalancer, disconnect, distance, fatal, getGeoCollection, getGeoSphereCollection, isShardedConfiguration, largeCollection, shardCollection, shardCollection, testAggregate, testAggregateCursor, testAggregateExplain, testAggregateStream, testAggregateTimeout, testAggregateWithGeoNear, testBatchedOperations, testBatchedWriteReordered, testBatchedWriteSerialized, testBatchedWriteSerializedAndStop, testCollectionStats, testCount, testCountDocumentToLarge, testCountTimeout, testCreateCappedCollection, testCreateCollection, testCreateIndex, testDatabaseStats, testDelete, testDeleteDocumentToLarge, testDistinct, testDistinctTimeout, testDropCollection, testDropDatabase, testDropIndex, testExplain, testFindAndModify, testFindAndModifyTimeout, testFindAndModifyWithNonExistantDocumentAndNoUpsert, testFindAndModifyWithUpsert, testFindOneWithSubsetOfFields, testFindTimeout, testFindWithComment, testFindWithCommentInProfile, testFindWithSubsetOfFields, testGridFs, testGridFsFsck, testGridFsVerify, testGroupBy, testGroupByTimeout, testInsertAlreadyExists, testInsertAndFindOne, testInsertDocumentToLarge, testIteratorAsync, testIteratorAsyncRead, testJournalDurabilityThrows, testListCollections, testListDatabases, testMapReduce, testMapReduceTimeout, testMultiFetchIterator, testMultiFetchIteratorWithLimit, testMultiFetchIteratorWithLimitRestart, testParallelScan, testParallelScanOnSecondary, testProfilingStatus, testQueryDocumentToLarge, testQueryWithAll, testQueryWithAnd, testQueryWithElementMatches, testQueryWithEqualsBoolean, testQueryWithEqualsByteArray, testQueryWithEqualsByteByteArray, testQueryWithEqualsDocumentAssignable, testQueryWithEqualsDoubleCloseToInteger, testQueryWithEqualsDoubleNotCloseToInt, testQueryWithEqualsInt, testQueryWithEqualsJavaScriptString, testQueryWithEqualsJavaScriptStringDocument, testQueryWithEqualsLong, testQueryWithEqualsMaxKey, testQueryWithEqualsMinKey, testQueryWithEqualsMongoTimestamp, testQueryWithEqualsMongoTimestampFailsWhenEncountersATimestamp, testQueryWithEqualsNull, testQueryWithEqualsObjectId, testQueryWithEqualsPattern, testQueryWithEqualsString, testQueryWithEqualsSymbol, testQueryWithEqualsTimestamp, testQueryWithExists, testQueryWithGeoWithinDocumentAssignable, testQueryWithGeoWithinUniqueDocsFalse, testQueryWithGeoWithinWithMultiPointField, testQueryWithGreaterThanByteArray, testQueryWithGreaterThanByteByteArray, testQueryWithGreaterThanDouble, testQueryWithGreaterThanInt, testQueryWithGreaterThanLong, testQueryWithGreaterThanMongoTimestamp, testQueryWithGreaterThanObjectId, testQueryWithGreaterThanOrEqualToByteArray, testQueryWithGreaterThanOrEqualToByteByteArray, testQueryWithGreaterThanOrEqualToDouble, testQueryWithGreaterThanOrEqualToInt, testQueryWithGreaterThanOrEqualToLong, testQueryWithGreaterThanOrEqualToMongoTimestamp, testQueryWithGreaterThanOrEqualToObjectId, testQueryWithGreaterThanOrEqualToString, testQueryWithGreaterThanOrEqualToSymbol, testQueryWithGreaterThanOrEqualToTimestamp, testQueryWithGreaterThanString, testQueryWithGreaterThanSymbol, testQueryWithGreaterThanTimestamp, testQueryWithIn, testQueryWithInstanceOf, testQueryWithIntersectsDocumentAssignable, testQueryWithLessThanByteArray, testQueryWithLessThanByteByteArray, testQueryWithLessThanDouble, testQueryWithLessThanInt, testQueryWithLessThanLong, testQueryWithLessThanMongoTimestamp, testQueryWithLessThanObjectId, testQueryWithLessThanOrEqualToByteArray, testQueryWithLessThanOrEqualToByteByteArray, testQueryWithLessThanOrEqualToDouble, testQueryWithLessThanOrEqualToInt, testQueryWithLessThanOrEqualToLong, testQueryWithLessThanOrEqualToMongoTimestamp, testQueryWithLessThanOrEqualToObjectId, testQueryWithLessThanOrEqualToString, testQueryWithLessThanOrEqualToSymbol, testQueryWithLessThanOrEqualToTimestamp, testQueryWithLessThanString, testQueryWithLessThanSymbol, testQueryWithLessThanTimestamp, testQueryWithMatches, testQueryWithModWithInt, testQueryWithModWithLong, testQueryWithNearDocumentAssignable, testQueryWithNearDocumentAssignableDouble, testQueryWithNearDoubleDouble, testQueryWithNearDoubleDoubleDouble, testQueryWithNearIntInt, testQueryWithNearIntIntInt, testQueryWithNearLongLong, testQueryWithNearLongLongLong, testQueryWithNearSphereDocumentAssignable, testQueryWithNearSphereDocumentAssignableDouble, testQueryWithNearSphereDoubleDouble, testQueryWithNearSphereDoubleDoubleDouble, testQueryWithNearSphereIntInt, testQueryWithNearSphereIntIntInt, testQueryWithNearSphereLongLong, testQueryWithNearSphereLongLongLong, testQueryWithNotEqualToBoolean, testQueryWithNotEqualToByteArray, testQueryWithNotEqualToByteByteArray, testQueryWithNotEqualToDocumentAssignable, testQueryWithNotEqualToDouble, testQueryWithNotEqualToInt, testQueryWithNotEqualToJavaScriptString, testQueryWithNotEqualToJavaScriptStringDocument, testQueryWithNotEqualToLong, testQueryWithNotEqualToMaxKey, testQueryWithNotEqualToMinKey, testQueryWithNotEqualToMongoTimestamp, testQueryWithNotEqualToNull, testQueryWithNotEqualToObjectId, testQueryWithNotEqualToPattern, testQueryWithNotEqualToString, testQueryWithNotEqualToSymbol, testQueryWithNotEqualToTimestamp, testQueryWithNotIn, testQueryWithSize, testQueryWithWhere, testQueryWithWithinBooleanPoint2DPoint2DPoint2DPoint2DArray, testQueryWithWithinDocumentAssignable, testQueryWithWithinDocumentAssignableBoolean, testQueryWithWithinDoubleDoubleDouble, testQueryWithWithinDoubleDoubleDoubleBoolean, testQueryWithWithinDoubleDoubleDoubleDouble, testQueryWithWithinDoubleDoubleDoubleDoubleBoolean, testQueryWithWithinIntIntInt, testQueryWithWithinIntIntIntBoolean, testQueryWithWithinIntIntIntInt, testQueryWithWithinIntIntIntIntBoolean, testQueryWithWithinLongLongLong, testQueryWithWithinLongLongLongBoolean, testQueryWithWithinLongLongLongLong, testQueryWithWithinLongLongLongLongBoolean, testQueryWithWithinOnSphereDoubleDoubleDouble, testQueryWithWithinOnSphereDoubleDoubleDoubleBoolean, testQueryWithWithinOnSphereIntIntInt, testQueryWithWithinOnSphereIntIntIntBoolean, testQueryWithWithinOnSphereLongLongLong, testQueryWithWithinOnSphereLongLongLongBoolean, testQueryWithWithinOnSphereWrapDoesNotWork, testQueryWithWithinPoint2DPoint2DPoint2DPoint2DArray, testRestartWithBadCursorIdFails, testSaveWithId, testSaveWithoutId, testStreamingFind, testStreamingFindLegacy, testTextSearch, testUpdate, testUpdateDocumentToLarge, testUpdateDurabilityFails, testUpdateOptions, testUpdateQueryToLarge, testUpdateWithSetAndUnset, testValidaterepairReplicaSet, startAuthenticated, startReplicaSet, startSharded, startShardedReplicaSets, startStandAlone, stopReplicaSet, stopSharded, stopShardedReplicaSets, stopStandAlonepublic static void startServer()
public static void stopServer()
public void connect()
connect in class BasicAcceptanceTestCasespublic void testGracefulStepdownRecovery()
public void testSecondaryPreferredLoading()
throws IOException,
InterruptedException,
ExecutionException
IOException - On a test failure.ExecutionException - On a test failure.InterruptedException - On a test failure.public void testStillQuerySecondariesWhenNoPrimary()
throws InterruptedException
InterruptedException - On a failure to sleep in the test.public void testSuddenFailureRecovery()
protected boolean isReplicaSetConfiguration()
Overridden to return true.
isReplicaSetConfiguration in class BasicAcceptanceTestCasesCopyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.