Skip to content

Commit e60f11c

Browse files
committed
Fix flaky tests of explain command
The server response now includes operationTime and $clusterTime, which usually won't change in a test scenario but occasionally do. The tests now remove those fields from explain responses before they are compared.
1 parent c8efd88 commit e60f11c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

driver-core/src/test/functional/com/mongodb/operation/QueryOperationHelper.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class QueryOperationHelper {
2525
document.remove('executionStats')
2626
document.remove('serverInfo')
2727
document.remove('executionTimeMillis')
28+
document.remove('operationTime')
29+
document.remove('$clusterTime')
2830
document
2931
}
3032

0 commit comments

Comments
 (0)