mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-41101 Give secondaries priority zero in jstests/sharding/move_chunk_*_with_write_retryability.js tests
This commit is contained in:
parent
6df77aa157
commit
c51307205e
@ -105,7 +105,15 @@ load("jstests/sharding/move_chunk_with_session_helper.js");
|
||||
},
|
||||
];
|
||||
|
||||
var st = new ShardingTest({shards: {rs0: {nodes: 2}, rs1: {nodes: 2}}});
|
||||
// Prevent unnecessary elections in the first shard replica set. Shard 'rs1' shard will need its
|
||||
// secondary to get elected, so we don't give it a zero priority.
|
||||
var st = new ShardingTest({
|
||||
mongos: 2,
|
||||
shards: {
|
||||
rs0: {nodes: [{rsConfig: {}}, {rsConfig: {priority: 0}}]},
|
||||
rs1: {nodes: [{rsConfig: {}}, {rsConfig: {}}]}
|
||||
}
|
||||
});
|
||||
assert.commandWorked(st.s.adminCommand({enableSharding: 'test'}));
|
||||
st.ensurePrimaryShard('test', st.shard0.shardName);
|
||||
|
||||
|
@ -10,7 +10,15 @@ load("jstests/sharding/move_chunk_with_session_helper.js");
|
||||
return;
|
||||
}
|
||||
|
||||
var st = new ShardingTest({shards: {rs0: {nodes: 2}, rs1: {nodes: 2}}});
|
||||
// Prevent unnecessary elections in the first shard replica set. Shard 'rs1' shard will need its
|
||||
// secondary to get elected, so we don't give it a zero priority.
|
||||
var st = new ShardingTest({
|
||||
mongos: 2,
|
||||
shards: {
|
||||
rs0: {nodes: [{rsConfig: {}}, {rsConfig: {priority: 0}}]},
|
||||
rs1: {nodes: [{rsConfig: {}}, {rsConfig: {}}]}
|
||||
}
|
||||
});
|
||||
assert.commandWorked(st.s.adminCommand({enableSharding: 'test'}));
|
||||
st.ensurePrimaryShard('test', st.shard0.shardName);
|
||||
|
||||
|
@ -10,7 +10,15 @@ load("jstests/sharding/move_chunk_with_session_helper.js");
|
||||
return;
|
||||
}
|
||||
|
||||
var st = new ShardingTest({shards: {rs0: {nodes: 2}, rs1: {nodes: 2}}});
|
||||
// Prevent unnecessary elections in the first shard replica set. Shard 'rs1' shard will need its
|
||||
// secondary to get elected, so we don't give it a zero priority.
|
||||
var st = new ShardingTest({
|
||||
mongos: 2,
|
||||
shards: {
|
||||
rs0: {nodes: [{rsConfig: {}}, {rsConfig: {priority: 0}}]},
|
||||
rs1: {nodes: [{rsConfig: {}}, {rsConfig: {}}]}
|
||||
}
|
||||
});
|
||||
assert.commandWorked(st.s.adminCommand({enableSharding: 'test'}));
|
||||
st.ensurePrimaryShard('test', st.shard0.shardName);
|
||||
|
||||
|
@ -10,7 +10,15 @@ load("jstests/sharding/move_chunk_with_session_helper.js");
|
||||
return;
|
||||
}
|
||||
|
||||
var st = new ShardingTest({shards: {rs0: {nodes: 2}, rs1: {nodes: 2}}});
|
||||
// Prevent unnecessary elections in the first shard replica set. Shard 'rs1' shard will need its
|
||||
// secondary to get elected, so we don't give it a zero priority.
|
||||
var st = new ShardingTest({
|
||||
mongos: 2,
|
||||
shards: {
|
||||
rs0: {nodes: [{rsConfig: {}}, {rsConfig: {priority: 0}}]},
|
||||
rs1: {nodes: [{rsConfig: {}}, {rsConfig: {}}]}
|
||||
}
|
||||
});
|
||||
assert.commandWorked(st.s.adminCommand({enableSharding: 'test'}));
|
||||
st.ensurePrimaryShard('test', st.shard0.shardName);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user