Skip to content

Commit 32543f3

Browse files
RUBY-3246 Test against 7.0 (#2725)
* Add 7.0 to text setup * Try to fix query cache spec * Try to fix snapshot query example * Disable latest for now * Get latest back * Do not test latest on ubuntu2204 * Fix failed specs
1 parent e9d8dc1 commit 32543f3

File tree

9 files changed

+57
-48
lines changed

9 files changed

+57
-48
lines changed

.evergreen/config.yml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,10 @@ axes:
668668
variables:
669669
MONGODB_VERSION: "latest"
670670
CRYPT_SHARED_VERSION: "latest"
671+
- id: "7.0"
672+
display_name: "7.0"
673+
variables:
674+
MONGODB_VERSION: "7.0"
671675
- id: "6.0"
672676
display_name: "6.0"
673677
variables:
@@ -1059,21 +1063,21 @@ buildvariants:
10591063
matrix_spec:
10601064
auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"]
10611065
ruby: "ruby-3.1"
1062-
mongodb-version: "6.0"
1066+
mongodb-version: ["latest", "7.0", "6.0"]
10631067
topology: ["standalone", "replica-set", "sharded-cluster"]
10641068
os: rhel8
10651069
display_name: ${auth-and-ssl} ${ruby} ${topology}
10661070
tasks:
10671071
- name: "test-mlaunch"
10681072

1069-
# 'latest' is broken until the QE2 changes are merged (RUBY-3211, RUBY-3226)
10701073
- matrix_name: "mongo-recent"
10711074
matrix_spec:
10721075
ruby: ["ruby-3.1", "jruby-9.3"]
1073-
#mongodb-version: ['latest', '6.0']
1074-
mongodb-version: ['6.0']
1076+
mongodb-version: ["latest", "7.0", "6.0"]
10751077
topology: ["standalone", "replica-set", "sharded-cluster"]
1076-
os: ['rhel8', 'ubuntu2204']
1078+
os: ['rhel8']
1079+
# There is no latest for ubuntu2204, so we can't test it here.
1080+
# os: ['rhel8', 'ubuntu2204']
10771081
display_name: "${mongodb-version} ${os} ${topology} ${auth-and-ssl} ${ruby}"
10781082
tasks:
10791083
- name: "test-mlaunch"
@@ -1358,19 +1362,17 @@ buildvariants:
13581362
tasks:
13591363
- name: "test-kerberos"
13601364

1361-
# 'latest' is broken until the QE2 changes are merged (RUBY-3211, RUBY-3226)
1362-
#
1363-
# - matrix_name: "fle-latest"
1364-
# matrix_spec:
1365-
# auth-and-ssl: "noauth-and-nossl"
1366-
# ruby: "ruby-3.1"
1367-
# topology: [replica-set, sharded-cluster]
1368-
# mongodb-version: [ 'latest' ]
1369-
# os: rhel8
1370-
# fle: helper
1371-
# display_name: "FLE: ${mongodb-version} ${topology} ${ruby}"
1372-
# tasks:
1373-
# - name: "test-fle"
1365+
- matrix_name: "fle-latest"
1366+
matrix_spec:
1367+
auth-and-ssl: "noauth-and-nossl"
1368+
ruby: "ruby-3.1"
1369+
topology: [replica-set, sharded-cluster]
1370+
mongodb-version: [ 'latest', '7.0' ]
1371+
os: rhel8
1372+
fle: helper
1373+
display_name: "FLE: ${mongodb-version} ${topology} ${ruby}"
1374+
tasks:
1375+
- name: "test-fle"
13741376

13751377
- matrix_name: "fle"
13761378
matrix_spec:

.evergreen/config/axes.yml.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ axes:
1818
variables:
1919
MONGODB_VERSION: "latest"
2020
CRYPT_SHARED_VERSION: "latest"
21+
- id: "7.0"
22+
display_name: "7.0"
23+
variables:
24+
MONGODB_VERSION: "7.0"
2125
- id: "6.0"
2226
display_name: "6.0"
2327
variables:

.evergreen/config/standard.yml.erb

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
latest_stable_mdb = "6.0".inspect # so it gets quoted as a string
4242

4343
# A few of the most recent MongoDB versions
44+
actual_and_upcoming_mdb = %w( latest 7.0 6.0 )
4445
recent_mdb = %w( 6.0 5.3 )
4546
latest_5x_mdb = "5.3".inspect # so it gets quoted as a string
4647
%>
@@ -50,21 +51,21 @@ buildvariants:
5051
matrix_spec:
5152
auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"]
5253
ruby: <%= latest_ruby %>
53-
mongodb-version: <%= latest_stable_mdb %>
54+
mongodb-version: <%= actual_and_upcoming_mdb %>
5455
topology: <%= topologies %>
5556
os: rhel8
5657
display_name: ${auth-and-ssl} ${ruby} ${topology}
5758
tasks:
5859
- name: "test-mlaunch"
5960

60-
# 'latest' is broken until the QE2 changes are merged (RUBY-3211, RUBY-3226)
6161
- matrix_name: "mongo-recent"
6262
matrix_spec:
6363
ruby: <%= recent_rubies %>
64-
#mongodb-version: ['latest', '6.0']
65-
mongodb-version: ['6.0']
64+
mongodb-version: <%= actual_and_upcoming_mdb %>
6665
topology: <%= topologies %>
67-
os: ['rhel8', 'ubuntu2204']
66+
os: ['rhel8']
67+
# There is no latest for ubuntu2204, so we can't test it here.
68+
# os: ['rhel8', 'ubuntu2204']
6869
display_name: "${mongodb-version} ${os} ${topology} ${auth-and-ssl} ${ruby}"
6970
tasks:
7071
- name: "test-mlaunch"
@@ -349,19 +350,17 @@ buildvariants:
349350
tasks:
350351
- name: "test-kerberos"
351352

352-
# 'latest' is broken until the QE2 changes are merged (RUBY-3211, RUBY-3226)
353-
#
354-
# - matrix_name: "fle-latest"
355-
# matrix_spec:
356-
# auth-and-ssl: "noauth-and-nossl"
357-
# ruby: <%= latest_ruby %>
358-
# topology: [replica-set, sharded-cluster]
359-
# mongodb-version: [ 'latest' ]
360-
# os: rhel8
361-
# fle: helper
362-
# display_name: "FLE: ${mongodb-version} ${topology} ${ruby}"
363-
# tasks:
364-
# - name: "test-fle"
353+
- matrix_name: "fle-latest"
354+
matrix_spec:
355+
auth-and-ssl: "noauth-and-nossl"
356+
ruby: <%= latest_ruby %>
357+
topology: [replica-set, sharded-cluster]
358+
mongodb-version: [ 'latest', '7.0' ]
359+
os: rhel8
360+
fle: helper
361+
display_name: "FLE: ${mongodb-version} ${topology} ${ruby}"
362+
tasks:
363+
- name: "test-fle"
365364

366365
- matrix_name: "fle"
367366
matrix_spec:

spec/integration/client_update_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
include_context 'with local kms_providers'
1616

1717
before do
18-
authorized_client.use(:keyvault)[:datakeys].drop
19-
authorized_client.use(:keyvault)[:datakeys].insert_one(data_key)
18+
authorized_client.use(:keyvault)[:datakeys, write_concern: { w: :majority }].drop
19+
authorized_client.use(:keyvault)[:datakeys, write_concern: { w: :majority }].insert_one(data_key)
2020
authorized_client.use(:auto_encryption)[:users].drop
2121
authorized_client.use(:auto_encryption)[:users,
2222
{

spec/integration/query_cache_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
min_server_fcv '3.6'
193193

194194
before do
195-
authorized_client['test'].drop
195+
authorized_client['test', write_concern: { w: :majority }].drop
196196
end
197197

198198
context 'when two queries have same read concern' do

spec/integration/snapshot_query_examples_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
context "Snapshot Query Example 1" do
1818
before do
1919
client = authorized_client.use('pets')
20-
client['cats'].delete_many
21-
client['dogs'].delete_many
20+
client['cats', write_concern: { w: :majority }].delete_many
21+
client['dogs', write_concern: { w: :majority }].delete_many
2222

23-
client['cats'].insert_one(
23+
client['cats', write_concern: { w: :majority }].insert_one(
2424
name: "Whiskers",
2525
color: "white",
2626
age: 10,
2727
adoptable: true
2828
)
2929

30-
client['dogs'].insert_one(
30+
client['dogs', write_concern: { w: :majority }].insert_one(
3131
name: "Pebbles",
3232
color: "Brown",
3333
age: 10,
@@ -75,9 +75,9 @@
7575

7676
before do
7777
client = authorized_client.use('retail')
78-
client['sales'].delete_many
78+
client['sales', write_concern: { w: :majority }].delete_many
7979

80-
client['sales'].insert_one(
80+
client['sales', write_concern: { w: :majority }].insert_one(
8181
shoeType: "boot",
8282
price: 30,
8383
saleDate: Time.now

spec/shared

spec/support/common_shortcuts.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,11 @@ def mock_dns(config)
373373
if $last_async_task.nil?
374374
STDERR.puts "No async task - server never started?"
375375
else
376-
$last_async_task.stop
376+
begin
377+
$last_async_task.stop
378+
rescue NoMethodError => e
379+
STDERR.puts "Error stopping async task: #{e}"
380+
end
377381
end
378382

379383
thread.kill

0 commit comments

Comments
 (0)