Skip to content

Commit 47de526

Browse files
authored
test: Add less restrictive gem spec for mongo gem (#1537)
* Add less restrictive gem spec for mongo gem It looks like latest features (including jruby 10 enablement) will require the latest minor release of the mongo gem. Specifically: The latest mongo gem relaxes the range for the ruby-bson gem. This would allow the uptake of mongodb/bson-ruby#353 if it is accepted. * Update test expectations based on latest mongo gem This commit updates the test expectation for an updated message string. The same behavior is observbed, the message has just been updated. This commit also updates construction of a test mongodb client with a newly required value for auth_source when building a simple client.
1 parent 67743b2 commit 47de526

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

instrumentation/mongo/Appraisals

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
#
55
# SPDX-License-Identifier: Apache-2.0
66

7-
appraise 'mongo-2.13' do
8-
gem 'mongo', '~> 2.13.0'
7+
appraise 'mongo-2' do
8+
gem 'mongo', '~> 2.13'
99
end

instrumentation/mongo/test/opentelemetry/instrumentation/mongo/subscriber_test.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ module MongoTraceTest
380380
_(span.events[0].name).must_equal 'exception'
381381
_(span.events[0].timestamp).must_be_kind_of Integer
382382
_(span.events[0].attributes['exception.type']).must_equal 'CommandFailed'
383-
_(span.events[0].attributes['exception.message']).must_equal 'ns not found (26)'
383+
_(span.events[0].attributes['exception.message']).must_equal '[26:NamespaceNotFound]: ns not found'
384384
end
385385

386386
describe 'that triggers #failed before #started' do
@@ -402,7 +402,8 @@ module MongoTraceTest
402402
database: TestHelper.database,
403403
auth_mech: :plain,
404404
user: 'plain_user',
405-
password: 'plain_pass'
405+
password: 'plain_pass',
406+
auth_source: '$external'
406407
}
407408
end
408409

0 commit comments

Comments
 (0)