-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
As part of RUBY-3033 the sdam integration tests were changed to unified tests. One of the tests is flaky because of the fact that we update the topology from both the push and rtt monitors. The legacy transaction test runner, for this reason, expects at least the amount of events expected, and not exactly that number. This ticket is for doing the same thing in the unified spec runner.
Legacy spec runner: https://github.com/mongodb/mongo-ruby-driver/blob/ad55437afad89d17ce0782e59efa9381b1013ebb/spec/runners/transactions/operation.rb#L195-L199
# We publish SDAM events from both regular and push monitors. # This means sometimes there are two ServerMarkedUnknownEvent # published for the same server transition. # Allow actual event count to be at least the expected event count # in case there are multiple transitions in a single test.
The flaky test:
1) SDAM unified spec tests insert-shutdown-error.yml Concurrent shutdown error on insert passes Failure/Error: raise Error::ResultMismatch, "#{msg}: expected #{expected}, actual #{actual}" Unified::Error::ResultMismatch: Expected event {"serverDescriptionChangedEvent"=>{"newDescription"=>{"type"=>"Unknown"}}} to occur 1 times but received it 2 times.: expected 1, actual 2 # ./spec/runners/unified/assertions.rb:215:in `assert_eq' # ./spec/runners/unified/support_operations.rb:263:in `block in assert_event_count' # ./spec/runners/unified/test.rb:481:in `use_all' # ./spec/runners/unified/test.rb:476:in `use_sub' # ./spec/runners/unified/test.rb:490:in `use_arguments' # ./spec/runners/unified/support_operations.rb:255:in `assert_event_count' # ./spec/runners/unified/test.rb:454:in `block in execute_operation' # ./spec/runners/unified/test.rb:481:in `use_all' # ./spec/runners/unified/test.rb:381:in `execute_operation' # ./spec/runners/unified/test.rb:376:in `block in execute_operations' # ./spec/runners/unified/test.rb:375:in `execute_operations' # ./spec/runners/unified/test.rb:345:in `run' # ./spec/runners/unified.rb:99:in `block in define_unified_spec_tests' # ./spec/support/macros.rb:12:in `block in config_override' # ./spec/lite_spec_helper.rb:141:in `block in /data/mci/87c0b3b30e9758bfed46a9cb0983d3c4/src/spec/lite_spec_helper.rb' # ./spec/lite_spec_helper.rb:140:in `block in /data/mci/87c0b3b30e9758bfed46a9cb0983d3c4/src/spec/lite_spec_helper.rb' # ./spec/lite_spec_helper.rb:120:in `block in /data/mci/87c0b3b30e9758bfed46a9cb0983d3c4/src/spec/lite_spec_helper.rb'