var st = new ShardingTest({ shards: 2, mongos: 2 });
st.stopBalancer();
var configDB = st.s.getDB('config');
configDB.adminCommand({ enableSharding: 'test' });
configDB.adminCommand({ shardCollection: 'test.user', key: { x: 1 }});
configDB.adminCommand({ split: 'test.user', middle: { x: 0 }});
var configDB2 = st.s1.getDB('config');
configDB2.adminCommand({ mergeChunks: 'test.user', bounds: [{ x: MinKey }, { x: MaxKey }]});
var res = configDB.adminCommand({ split: 'test.user', middle: { x: 0 }});
assert(res.ok, 'command failed: ' + tojson(res));
st.stop();