summaryrefslogtreecommitdiff
path: root/jstests/sharding/movechunk_with_noMoveParanoia.js
diff options
context:
space:
mode:
authorScott Hernandez <scotthernandez@gmail.com>2012-12-21 13:44:00 -0500
committerScott Hernandez <scotthernandez@gmail.com>2012-12-21 13:45:59 -0500
commit83e89860d8355b65716c044c1bf047ea2d6b8c16 (patch)
tree9d71a815f618f7a626b7d930074a120de19fb13d /jstests/sharding/movechunk_with_noMoveParanoia.js
parentaee475b5babbe42fecc638091dbc425fddddf813 (diff)
downloadmongo-83e89860d8355b65716c044c1bf047ea2d6b8c16.tar.gz
SERVER-7453: change noMoveParanoia to default; added moveParanoia flag and made both hidden
Diffstat (limited to 'jstests/sharding/movechunk_with_noMoveParanoia.js')
-rw-r--r--jstests/sharding/movechunk_with_noMoveParanoia.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/jstests/sharding/movechunk_with_noMoveParanoia.js b/jstests/sharding/movechunk_with_noMoveParanoia.js
new file mode 100644
index 00000000000..9f108b60771
--- /dev/null
+++ b/jstests/sharding/movechunk_with_noMoveParanoia.js
@@ -0,0 +1,20 @@
+/**
+ * This test sets moveParanoia flag and then check that the directory is created with the moved data
+ */
+var st = new ShardingTest( { shards: 2,
+ mongos:1,
+ other : {
+ chunksize : 1,
+ shardOptions: { noMoveParanoia:"" }}});
+
+load("jstests/sharding/movechunk_include.js")
+setupMoveChunkTest(st);
+
+
+var shards = [st.shard0, st.shard1];
+for(i in shards) {
+ var dbpath = shards[i].adminCommand("getCmdLineOpts").parsed.dbpath;
+ var hasMoveChunkDir = 0 != ls(dbpath).filter(function(a) {return null != a.match("moveChunk")}).length
+ assert(!hasMoveChunkDir, dbpath + ": has MoveChunk directory + " + ls(dbpath))
+}
+st.stop()