Skip to content

Commit

Permalink
there were two...
Browse files Browse the repository at this point in the history
  • Loading branch information
evanchooly committed Aug 26, 2023
1 parent 5775654 commit 40dab6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/src/test/java/dev/morphia/test/query/TestQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ public void testMultipleConstraintsOnOneField() {
lt("size", 100));

Map<String, Object> explain = query.explain();
Map<String, Object> inputStage = null;
Map<String, Object> inputStage;

if (explain.get("explainVersion").equals("1")) {
inputStage = walk(explain, List.of("queryPlanner", "winningPlan", "inputStage"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -759,9 +759,13 @@ public void testMultipleConstraintsOnOneField() {
query.field("size").lessThan(100);

Map<String, Object> explain = query.explain();
Map<String, Object> queryPlanner = (Map<String, Object>) explain.get("queryPlanner");
Map<String, Object> winningPlan = (Map<String, Object>) queryPlanner.get("winningPlan");
Map<String, Object> inputStage = (Map<String, Object>) winningPlan.get("inputStage");
Map<String, Object> inputStage;

if (explain.get("explainVersion").equals("1")) {
inputStage = walk(explain, List.of("queryPlanner", "winningPlan", "inputStage"));
} else {
inputStage = walk(explain, List.of("queryPlanner", "winningPlan", "queryPlan", "inputStage"));
}
assertEquals(inputStage.get("stage"), "IXSCAN");
}

Expand Down

0 comments on commit 40dab6b

Please sign in to comment.