Skip to content

Commit c928e60

Browse files
authored
RUBY-1599 Test against BSON 5 (#2740)
* let's not run 2.18-stable specs against MDB 7+ * Revert "let's not run 2.18-stable specs against MDB 7+" Meant to do this on a branch :/ This reverts commit 1f3f7c7. * remove dead comments, and permit bson5 for these specs * name the bson matrix appropriately * fix duplicate variant names
1 parent eef4b20 commit c928e60

File tree

3 files changed

+5
-66
lines changed

3 files changed

+5
-66
lines changed

.evergreen/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ buildvariants:
10661066
mongodb-version: ["latest", "7.0", "6.0"]
10671067
topology: ["standalone", "replica-set", "sharded-cluster"]
10681068
os: rhel8
1069-
display_name: ${auth-and-ssl} ${ruby} ${topology}
1069+
display_name: ${auth-and-ssl} ${ruby} db-${mongodb-version} ${topology}
10701070
tasks:
10711071
- name: "test-mlaunch"
10721072

@@ -1338,7 +1338,7 @@ buildvariants:
13381338
topology: replica-set
13391339
bson: "*"
13401340
os: rhel8
1341-
display_name: "AS ${mongodb-version} ${topology} ${ruby} ${bson}"
1341+
display_name: "bson-${bson} ${mongodb-version} ${topology} ${ruby}"
13421342
tasks:
13431343
- name: "test-mlaunch"
13441344

.evergreen/config/standard.yml.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ buildvariants:
4848
mongodb-version: <%= actual_and_upcoming_mdb %>
4949
topology: <%= topologies %>
5050
os: rhel8
51-
display_name: ${auth-and-ssl} ${ruby} ${topology}
51+
display_name: ${auth-and-ssl} ${ruby} db-${mongodb-version} ${topology}
5252
tasks:
5353
- name: "test-mlaunch"
5454

@@ -320,7 +320,7 @@ buildvariants:
320320
topology: replica-set
321321
bson: "*"
322322
os: rhel8
323-
display_name: "AS ${mongodb-version} ${topology} ${ruby} ${bson}"
323+
display_name: "bson-${bson} ${mongodb-version} ${topology} ${ruby}"
324324
tasks:
325325
- name: "test-mlaunch"
326326

spec/mongo/protocol/msg_spec.rb

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22
# rubocop:todo all
33

4-
require 'lite_spec_helper'
4+
require 'spec_helper'
55
require 'support/shared/protocol'
66

77
describe Mongo::Protocol::Msg do
@@ -237,44 +237,6 @@
237237
end
238238
end
239239

240-
=begin no longer supported
241-
context 'when a 0 payload type is specified' do
242-
243-
let(:section) do
244-
{ type: 0, payload: { ismaster: 1 } }
245-
end
246-
247-
let(:section_payload_type) { bytes.to_s[36] }
248-
let(:section_bytes) { bytes.to_s[37..-1] }
249-
250-
it 'sets the payload type' do
251-
expect(section_payload_type).to eq(0.chr)
252-
end
253-
254-
it 'serializes the section' do
255-
expect(section_bytes).to be_bson(section[:payload])
256-
end
257-
end
258-
259-
context 'when a no payload type is specified' do
260-
261-
let(:section) do
262-
{ payload: { ismaster: 1 } }
263-
end
264-
265-
let(:section_payload_type) { bytes.to_s[36] }
266-
let(:section_bytes) { bytes.to_s[37..-1] }
267-
268-
it 'sets the payload type as 0' do
269-
expect(section_payload_type).to eq(0.chr)
270-
end
271-
272-
it 'serializes the section' do
273-
expect(section_bytes).to be_bson(section[:payload])
274-
end
275-
end
276-
=end
277-
278240
context 'when a payload of type 1 is specified' do
279241

280242
let(:section) do
@@ -366,32 +328,9 @@
366328
end
367329
end
368330
end
369-
370-
=begin no longer supported
371-
context 'when the sections are mixed types and payload type 1 comes before type 0' do
372-
373-
let(:section1) do
374-
Mongo::Protocol::Msg::Section1.new('documents', [ { a: 1 } ])
375-
end
376-
377-
let(:section2) do
378-
{ type: 0, payload: { 'b' => 2 } }
379-
end
380-
381-
let(:sections) do
382-
[ section1, section2 ]
383-
end
384-
385-
it 'serializes all sections' do
386-
expect(deserialized.documents).to eq([ BSON::Document.new(main_document), { 'a' => 1 }, { 'b' => 2 }])
387-
end
388-
end
389-
=end
390331
end
391332

392333
context 'when the validating_keys option is true with payload 1' do
393-
max_bson_version '4.99.99'
394-
395334
let(:sequences) do
396335
[ section ]
397336
end

0 commit comments

Comments
 (0)