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()
2013
2013
else
2014
2014
{
2015
2015
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
+ }
2017
2022
var stage = inputStage [ "stage" ] . AsString ;
2018
2023
var keyPattern = inputStage [ "keyPattern" ] . AsBsonDocument ;
2019
2024
Assert . That ( stage , Is . EqualTo ( "IXSCAN" ) ) ;
You can’t perform that action at this time.
0 commit comments