summaryrefslogtreecommitdiff
path: root/jstests/sharding/movechunk_with_moveParanoia.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_moveParanoia.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_moveParanoia.js')
-rw-r--r--jstests/sharding/movechunk_with_moveParanoia.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/jstests/sharding/movechunk_with_moveParanoia.js b/jstests/sharding/movechunk_with_moveParanoia.js
new file mode 100644
index 00000000000..0b01f1fa136
--- /dev/null
+++ b/jstests/sharding/movechunk_with_moveParanoia.js
@@ -0,0 +1,23 @@
+/**
+ * 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: { moveParanoia:"" }}});
+
+load("jstests/sharding/movechunk_include.js")
+setupMoveChunkTest(st);
+
+var shards = [st.shard0, st.shard1];
+var foundMoveChunk = false;
+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
+ foundMoveChunk = foundMoveChunk || hasMoveChunkDir;
+}
+
+assert(foundMoveChunk, "did not find moveChunk directory!")
+
+st.stop()