Skip to content

Commit fcf97ff

Browse files
committed
Update test to reflect desired behavior. SERVER-3718
1 parent 68966c1 commit fcf97ff

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

jstests/sharding/index1.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,26 +120,22 @@ for ( var i = 0; i < 10; i++ ) {
120120
}
121121
catch( e ){
122122
print(e)
123-
assert( false, "Should be able to shard collection with no index.")
123+
assert( false, "Should be able to shard collection with no unique index but with a unique prefix index.")
124124
}
125125

126126
}
127127
if ( i == 7 ) {
128-
if (false) { // SERVER-3718
129128
coll.remove()
130129

131130
// No index exists
132131

133-
passed = false
134132
try{
135133
s.adminCommand({ shardcollection : "" + coll, key : { num : 1 } })
136-
passed = true
137134
}
138135
catch( e ){
139136
print(e)
137+
assert( !passed, "Should be able to shard collection with no index on shard key.")
140138
}
141-
assert( !passed, "Should not shard collection with no index on shard key.")
142-
}
143139
}
144140
if ( i == 8 ) {
145141
if (false) { // SERVER-3718
@@ -155,7 +151,7 @@ for ( var i = 0; i < 10; i++ ) {
155151
catch( e ){
156152
print(e)
157153
}
158-
assert( !passed, "Should not shard collection with no index on shard key.")
154+
assert( !passed, "Should not shard collection with unique flag but with no unique index on shard key.")
159155
}
160156
}
161157
if ( i == 9 ) {

0 commit comments

Comments
 (0)