File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -2013,7 +2013,12 @@ public void TestHashedIndex()
20132013 else
20142014 {
20152015 var winningPlan = plan [ "queryPlanner" ] [ "winningPlan" ] . AsBsonDocument ;
2016- var inputStage = winningPlan [ "inputStage" ] [ "inputStage" ] . AsBsonDocument ; // not sure why there are two inputStages
2016+ var inputStage = winningPlan [ "inputStage" ] . AsBsonDocument ;
2017+ // working around a server bug were sometimes the inputStage is nested inside the inputStage
2018+ if ( inputStage . Contains ( "inputStage" ) )
2019+ {
2020+ inputStage = inputStage [ "inputStage" ] . AsBsonDocument ;
2021+ }
20172022 var stage = inputStage [ "stage" ] . AsString ;
20182023 var keyPattern = inputStage [ "keyPattern" ] . AsBsonDocument ;
20192024 Assert . That ( stage , Is . EqualTo ( "IXSCAN" ) ) ;
You can’t perform that action at this time.
0 commit comments