Skip to content

Commit cddfeed

Browse files
RUBY-3372 Fix failing explain tests (#2782)
1 parent dd27df7 commit cddfeed

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spec/mongo/collection/view/aggregation_spec.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,12 @@
321321
min_server_fcv '4.2'
322322

323323
let(:result) do
324-
aggregation.explain['queryPlanner']['collation']['locale']
324+
if aggregation.explain.key?('queryPlanner')
325+
aggregation.explain['queryPlanner']['collation']['locale']
326+
else
327+
# 7.2+ sharded cluster
328+
aggregation.explain['shards'].first.last['queryPlanner']['collation']['locale']
329+
end
325330
end
326331

327332
it_behaves_like 'applies the collation'

0 commit comments

Comments
 (0)