From 185efda9f8d00473dc6e66d5d92564da3256c093 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Mon, 24 Nov 2025 08:06:19 -0700 Subject: [PATCH 1/4] Use correct repository for drivers-github-tools --- .github/workflows/release.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbaf66a533..73450cfb25 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,6 @@ on: required: true env: - SILK_ASSET_GROUP: mongodb-ruby-driver GEM_NAME: mongo PRODUCT_NAME: Ruby Driver PRODUCT_ID: mongodb-ruby-driver @@ -47,7 +46,7 @@ jobs: steps: - name: "Run the check action" id: check - uses: jamis/drivers-github-tools/ruby/pr-check@ruby-3643-update-release-process + uses: mongodb-labs/drivers-github-tools/ruby/pr-check@v3 build: name: "Build Gems" @@ -56,7 +55,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Run the build action" - uses: jamis/drivers-github-tools/ruby/build@ruby-3643-update-release-process + uses: mongodb-labs/drivers-github-tools/ruby/build@v3 with: app_id: ${{ vars.APP_ID }} app_private_key: ${{ secrets.APP_PRIVATE_KEY }} @@ -72,7 +71,7 @@ jobs: runs-on: 'ubuntu-latest' steps: - name: "Run the publish action" - uses: jamis/drivers-github-tools/ruby/publish@ruby-3643-update-release-process + uses: mongodb-labs/drivers-github-tools/ruby/publish@v3 with: app_id: ${{ vars.APP_ID }} app_private_key: ${{ secrets.APP_PRIVATE_KEY }} @@ -84,5 +83,4 @@ jobs: product_name: ${{ env.PRODUCT_NAME }} product_id: ${{ env.PRODUCT_ID }} release_message: ${{ needs.check.outputs.message }} - silk_asset_group: ${{ env.SILK_ASSET_GROUP }} ref: ${{ needs.check.outputs.ref }} From d8ad7e724d9118326de91284a86c353024b03d46 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Fri, 22 Aug 2025 08:16:50 -0600 Subject: [PATCH 2/4] RUBY-3652 Remove serverless testing (#2942) * RUBY-3652 Remove serverless testing * don't kill all server sessions for the atlas full tests --- .evergreen/config.yml | 115 ----------------------------- .evergreen/config/common.yml.erb | 115 ----------------------------- .evergreen/run-tests-atlas-full.sh | 2 +- spec/runners/crud.rb | 12 ++- spec/runners/crud/requirement.rb | 59 ++++++++++----- spec/runners/unified/test.rb | 2 - spec/support/spec_config.rb | 28 +++---- 7 files changed, 58 insertions(+), 275 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index ba305a39f9..338139f77b 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -120,19 +120,7 @@ functions: export ATLAS_FREE_TIER_URI="${atlas_free_tier_uri}" export ATLAS_TLS11_URI="${atlas_tls11_uri}" export ATLAS_TLS12_URI="${atlas_tls12_uri}" - export ATLAS_SERVERLESS_URI="${atlas_serverless_uri}" - export ATLAS_SERVERLESS_LB_URI="${atlas_serverless_lb_uri}" - export ATLAS_X509_CERT_BASE64="${atlas_x509_cert_base64}" - export ATLAS_X509_URI="${atlas_x509}" - export ATLAS_X509_DEV_CERT_BASE64="${atlas_x509_dev_cert_base64}" - export ATLAS_X509_DEV_URI="${atlas_x509_dev}" export RVM_RUBY="${RVM_RUBY}" - - export SERVERLESS_DRIVERS_GROUP="${SERVERLESS_DRIVERS_GROUP}" - export SERVERLESS_API_PUBLIC_KEY="${SERVERLESS_API_PUBLIC_KEY}" - export SERVERLESS_API_PRIVATE_KEY="${SERVERLESS_API_PRIVATE_KEY}" - export SERVERLESS_ATLAS_USER="${SERVERLESS_ATLAS_USER}" - export SERVERLESS_ATLAS_PASSWORD="${SERVERLESS_ATLAS_PASSWORD}" EOT # See what we've done @@ -364,17 +352,6 @@ functions: script: | rm -f .env.private - "build and test docker image": - - command: shell.exec - type: test - params: - shell: bash - working_dir: "src" - script: | - ${PREPARE_SHELL} - set -x - .evergreen/test-on-docker -d ${os} MONGODB_VERSION=${mongodb-version} TOPOLOGY=${topology} RVM_RUBY=${ruby} -s .evergreen/run-tests.sh TEST_CMD=true ${PRELOAD_ARG} - "run benchmarks": - command: shell.exec type: test @@ -405,23 +382,6 @@ functions: fi .evergreen/run-tests.sh - "run tests via docker": - - command: shell.exec - type: test - params: - shell: bash - working_dir: "src" - script: | - ${PREPARE_SHELL} - # Needed for generating temporary aws credentials. - if [ -n "${FLE}" ]; - then - export AWS_ACCESS_KEY_ID="${fle_aws_key}" - export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}" - export AWS_DEFAULT_REGION="${fle_aws_region}" - fi - .evergreen/run-tests-docker.sh - "run AWS auth tests": - command: shell.exec type: test @@ -442,16 +402,6 @@ functions: ${PREPARE_SHELL} .evergreen/run-tests-kerberos-unit.sh - "run Kerberos integration tests": - - command: shell.exec - type: test - params: - shell: bash - working_dir: "src" - script: | - ${PREPARE_SHELL} - .evergreen/run-tests-kerberos-integration.sh - "run Atlas tests": - command: shell.exec type: test @@ -471,24 +421,6 @@ functions: ATLAS_X509_DEV_URI="${atlas_x509_dev}" \ .evergreen/run-tests-atlas.sh - "run serverless tests": - - command: shell.exec - type: test - params: - shell: bash - working_dir: "src" - script: | - ${PREPARE_SHELL} - # Needed for generating temporary aws credentials. - if [ -n "${FLE}" ]; - then - export AWS_ACCESS_KEY_ID="${fle_aws_key}" - export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}" - export AWS_DEFAULT_REGION="${fle_aws_region}" - fi - - CRYPT_SHARED_LIB_PATH="${CRYPT_SHARED_LIB_PATH}" SERVERLESS=1 SSL=ssl RVM_RUBY="${RVM_RUBY}" SINGLE_MONGOS="${SINGLE_MONGOS}" SERVERLESS_URI="${SERVERLESS_URI}" FLE="${FLE}" SERVERLESS_MONGODB_VERSION="${SERVERLESS_MONGODB_VERSION}" .evergreen/run-tests-serverless.sh - pre: - func: "fetch source" - func: "create expansions" @@ -502,35 +434,6 @@ post: - func: "upload test results to s3" task_groups: - - name: serverless_task_group - setup_group_can_fail_task: true - setup_group_timeout_secs: 1800 # 30 minutes - setup_group: - - func: "fetch source" - - func: "create expansions" - - command: ec2.assume_role - params: - role_arn: ${aws_test_secrets_role} - - command: shell.exec - params: - shell: "bash" - script: | - ${PREPARE_SHELL} - bash ${DRIVERS_TOOLS}/.evergreen/serverless/setup-secrets.sh - bash ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh - - command: expansions.update - params: - file: serverless-expansion.yml - teardown_task: - - command: shell.exec - params: - script: | - ${PREPARE_SHELL} - bash ${DRIVERS_TOOLS}/.evergreen/serverless/delete-instance.sh - - func: "upload test results" - tasks: - - "test-serverless" - - name: testatlas_full_task_group setup_group_can_fail_task: true setup_group_timeout_secs: 1800 # 30 minutes @@ -716,26 +619,12 @@ tasks: - name: "test-atlas" commands: - func: "run Atlas tests" - - name: "test-serverless" - commands: - - func: "export FLE credentials" - - func: "run serverless tests" - - name: "test-docker" - commands: - - func: "build and test docker image" - name: "test-mlaunch" commands: - func: "run tests" - name: "driver-bench" commands: - func: "run benchmarks" - - name: "test-via-docker" - commands: - - func: "run tests via docker" - - name: "test-kerberos-integration" - commands: - - func: "export Kerberos credentials" - - func: "run Kerberos integration tests" - name: "test-kerberos" commands: - func: "run Kerberos unit tests" @@ -746,10 +635,6 @@ tasks: commands: - func: "export FLE credentials" - func: "run tests" - - name: "test-fle-via-docker" - commands: - - func: "export FLE credentials" - - func: "run tests via docker" - name: "test-aws-auth" commands: - func: "export AWS auth credentials" diff --git a/.evergreen/config/common.yml.erb b/.evergreen/config/common.yml.erb index 64fd622a11..85fddd3dd0 100644 --- a/.evergreen/config/common.yml.erb +++ b/.evergreen/config/common.yml.erb @@ -117,19 +117,7 @@ functions: export ATLAS_FREE_TIER_URI="${atlas_free_tier_uri}" export ATLAS_TLS11_URI="${atlas_tls11_uri}" export ATLAS_TLS12_URI="${atlas_tls12_uri}" - export ATLAS_SERVERLESS_URI="${atlas_serverless_uri}" - export ATLAS_SERVERLESS_LB_URI="${atlas_serverless_lb_uri}" - export ATLAS_X509_CERT_BASE64="${atlas_x509_cert_base64}" - export ATLAS_X509_URI="${atlas_x509}" - export ATLAS_X509_DEV_CERT_BASE64="${atlas_x509_dev_cert_base64}" - export ATLAS_X509_DEV_URI="${atlas_x509_dev}" export RVM_RUBY="${RVM_RUBY}" - - export SERVERLESS_DRIVERS_GROUP="${SERVERLESS_DRIVERS_GROUP}" - export SERVERLESS_API_PUBLIC_KEY="${SERVERLESS_API_PUBLIC_KEY}" - export SERVERLESS_API_PRIVATE_KEY="${SERVERLESS_API_PRIVATE_KEY}" - export SERVERLESS_ATLAS_USER="${SERVERLESS_ATLAS_USER}" - export SERVERLESS_ATLAS_PASSWORD="${SERVERLESS_ATLAS_PASSWORD}" EOT # See what we've done @@ -361,17 +349,6 @@ functions: script: | rm -f .env.private - "build and test docker image": - - command: shell.exec - type: test - params: - shell: bash - working_dir: "src" - script: | - ${PREPARE_SHELL} - set -x - .evergreen/test-on-docker -d ${os} MONGODB_VERSION=${mongodb-version} TOPOLOGY=${topology} RVM_RUBY=${ruby} -s .evergreen/run-tests.sh TEST_CMD=true ${PRELOAD_ARG} - "run benchmarks": - command: shell.exec type: test @@ -402,23 +379,6 @@ functions: fi .evergreen/run-tests.sh - "run tests via docker": - - command: shell.exec - type: test - params: - shell: bash - working_dir: "src" - script: | - ${PREPARE_SHELL} - # Needed for generating temporary aws credentials. - if [ -n "${FLE}" ]; - then - export AWS_ACCESS_KEY_ID="${fle_aws_key}" - export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}" - export AWS_DEFAULT_REGION="${fle_aws_region}" - fi - .evergreen/run-tests-docker.sh - "run AWS auth tests": - command: shell.exec type: test @@ -439,16 +399,6 @@ functions: ${PREPARE_SHELL} .evergreen/run-tests-kerberos-unit.sh - "run Kerberos integration tests": - - command: shell.exec - type: test - params: - shell: bash - working_dir: "src" - script: | - ${PREPARE_SHELL} - .evergreen/run-tests-kerberos-integration.sh - "run Atlas tests": - command: shell.exec type: test @@ -468,24 +418,6 @@ functions: ATLAS_X509_DEV_URI="${atlas_x509_dev}" \ .evergreen/run-tests-atlas.sh - "run serverless tests": - - command: shell.exec - type: test - params: - shell: bash - working_dir: "src" - script: | - ${PREPARE_SHELL} - # Needed for generating temporary aws credentials. - if [ -n "${FLE}" ]; - then - export AWS_ACCESS_KEY_ID="${fle_aws_key}" - export AWS_SECRET_ACCESS_KEY="${fle_aws_secret}" - export AWS_DEFAULT_REGION="${fle_aws_region}" - fi - - CRYPT_SHARED_LIB_PATH="${CRYPT_SHARED_LIB_PATH}" SERVERLESS=1 SSL=ssl RVM_RUBY="${RVM_RUBY}" SINGLE_MONGOS="${SINGLE_MONGOS}" SERVERLESS_URI="${SERVERLESS_URI}" FLE="${FLE}" SERVERLESS_MONGODB_VERSION="${SERVERLESS_MONGODB_VERSION}" .evergreen/run-tests-serverless.sh - pre: - func: "fetch source" - func: "create expansions" @@ -499,35 +431,6 @@ post: - func: "upload test results to s3" task_groups: - - name: serverless_task_group - setup_group_can_fail_task: true - setup_group_timeout_secs: 1800 # 30 minutes - setup_group: - - func: "fetch source" - - func: "create expansions" - - command: ec2.assume_role - params: - role_arn: ${aws_test_secrets_role} - - command: shell.exec - params: - shell: "bash" - script: | - ${PREPARE_SHELL} - bash ${DRIVERS_TOOLS}/.evergreen/serverless/setup-secrets.sh - bash ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh - - command: expansions.update - params: - file: serverless-expansion.yml - teardown_task: - - command: shell.exec - params: - script: | - ${PREPARE_SHELL} - bash ${DRIVERS_TOOLS}/.evergreen/serverless/delete-instance.sh - - func: "upload test results" - tasks: - - "test-serverless" - - name: testatlas_full_task_group setup_group_can_fail_task: true setup_group_timeout_secs: 1800 # 30 minutes @@ -713,26 +616,12 @@ tasks: - name: "test-atlas" commands: - func: "run Atlas tests" - - name: "test-serverless" - commands: - - func: "export FLE credentials" - - func: "run serverless tests" - - name: "test-docker" - commands: - - func: "build and test docker image" - name: "test-mlaunch" commands: - func: "run tests" - name: "driver-bench" commands: - func: "run benchmarks" - - name: "test-via-docker" - commands: - - func: "run tests via docker" - - name: "test-kerberos-integration" - commands: - - func: "export Kerberos credentials" - - func: "run Kerberos integration tests" - name: "test-kerberos" commands: - func: "run Kerberos unit tests" @@ -743,10 +632,6 @@ tasks: commands: - func: "export FLE credentials" - func: "run tests" - - name: "test-fle-via-docker" - commands: - - func: "export FLE credentials" - - func: "run tests via docker" - name: "test-aws-auth" commands: - func: "export AWS auth credentials" diff --git a/.evergreen/run-tests-atlas-full.sh b/.evergreen/run-tests-atlas-full.sh index 2fb15001c1..c292d73c82 100755 --- a/.evergreen/run-tests-atlas-full.sh +++ b/.evergreen/run-tests-atlas-full.sh @@ -13,7 +13,7 @@ set_env_ruby bundle_install ATLAS_URI=$MONGODB_URI \ - SERVERLESS=1 \ + KILL_ALL_SERVER_SESSIONS=0 \ EXAMPLE_TIMEOUT=600 \ bundle exec rspec -fd spec/integration/search_indexes_prose_spec.rb diff --git a/spec/runners/crud.rb b/spec/runners/crud.rb index b0a76b5aca..98c16cdce6 100644 --- a/spec/runners/crud.rb +++ b/spec/runners/crud.rb @@ -224,14 +224,12 @@ def define_spec_tests_with_requirements(spec, &block) if req.topologies require_topology *req.topologies end - if SpecConfig.instance.serverless? && req.serverless == :forbid - before(:all) do - skip "Serverless forbidden" - end - end - if !SpecConfig.instance.serverless? && req.serverless == :require + + # Once `serverless: require` is no longer present in any specs, + # this can be removed. + if req.serverless == :require before(:all) do - skip "Serverless required" + skip 'Serverless tests are no longer enabled, per RUBY-3652' end end diff --git a/spec/runners/crud/requirement.rb b/spec/runners/crud/requirement.rb index 641de1ef75..29504f7a58 100644 --- a/spec/runners/crud/requirement.rb +++ b/spec/runners/crud/requirement.rb @@ -4,7 +4,7 @@ module Mongo module CRUD class Requirement - YAML_KEYS = %w(auth minServerVersion maxServerVersion topology topologies serverParameters serverless csfle).freeze + YAML_KEYS = %w(auth minServerVersion maxServerVersion topology topologies serverParameters csfle).freeze def initialize(spec) spec = spec.dup @@ -38,16 +38,6 @@ def initialize(spec) nil end @server_parameters = spec['serverParameters'] - @serverless = if serverless = spec['serverless'] - case spec['serverless'] - when 'require' then :require - when 'forbid' then :forbid - when 'allow' then :allow - else raise "Unknown serverless requirement: #{serverless}" - end - else - nil - end @auth = spec['auth'] @csfle = !!spec['csfle'] if spec['csfle'] end @@ -55,7 +45,45 @@ def initialize(spec) attr_reader :min_server_version attr_reader :max_server_version attr_reader :topologies - attr_reader :serverless + + # `serverless` is a deprecated field. This module is a crutch to help + # us through the transition period where some specs still have it. + module DeprecatedServerless + def self.prepended(base) + new_list = [ *base::YAML_KEYS, 'serverless' ].freeze + + base.send(:remove_const, :YAML_KEYS) + base.send(:const_set, :YAML_KEYS, new_list) + end + + attr_reader :serverless + + def initialize(spec) + super + initialize_serverless(spec) + end + + private + + def initialize_serverless(spec) + @serverless = if serverless = spec['serverless'] + case spec['serverless'] + when 'require' then :require + when 'forbid' then :forbid + when 'allow' then :allow + else raise "Unknown serverless requirement: #{serverless}" + end + else + nil + end + + if @serverless && @serverless != :forbid + warn "The `serverless` requirement is deprecated." + end + end + end + + prepend DeprecatedServerless def short_min_server_version if min_server_version @@ -101,13 +129,6 @@ def satisfied? end end end - if @serverless - if SpecConfig.instance.serverless? - ok = ok && [:allow, :require].include?(serverless) - else - ok = ok && [:allow, :forbid].include?(serverless) - end - end if @auth == true ok &&= SpecConfig.instance.auth? elsif @auth == false diff --git a/spec/runners/unified/test.rb b/spec/runners/unified/test.rb index 32b0ba0a82..775b0782ae 100644 --- a/spec/runners/unified/test.rb +++ b/spec/runners/unified/test.rb @@ -556,8 +556,6 @@ def kill_sessions # drivers-atlas-testing, ignore. SERVER-54216 elsif e.code == 59 # no such command (old server), ignore - elsif e.code == 8000 - # CMD_NOT_ALLOWED: killAllSessions - running against a serverless instance else raise end diff --git a/spec/support/spec_config.rb b/spec/support/spec_config.rb index 34d6c6d478..20588c1aa4 100644 --- a/spec/support/spec_config.rb +++ b/spec/support/spec_config.rb @@ -162,19 +162,9 @@ def ocsp_connectivity? ENV.key?('OCSP_CONNECTIVITY') && ENV['OCSP_CONNECTIVITY'] != '' end - # Detect whether specs are running against Mongodb Atlas serverless instance. - # This method does not do any magic, it just checks whether environment - # variable SERVERLESS is set. This is a recommended way to inform spec runners - # that they are running against a serverless instance - # - # @return [ true | false ] Whether specs are running against a serverless instance. - def serverless? - !!ENV['SERVERLESS'] - end - def kill_all_server_sessions? - !serverless? && # Serverless instances do not support killAllSessions command. - ClusterConfig.instance.fcv_ish >= '3.6' + allow = ENV['KILL_ALL_SERVER_SESSIONS'] != '0' + allow && ClusterConfig.instance.fcv_ish >= '3.6' end # Test suite configuration @@ -670,10 +660,6 @@ def root_user # Get the default test user for the suite on versions 2.6 and higher. def test_user - # When testing against a serverless instance, we are not allowed to create - # new users, we just have one user for everyhing. - return root_user if serverless? - Mongo::Auth::User.new( database: 'admin', user: 'ruby-test-user', @@ -764,4 +750,14 @@ def credentials_or_external_user(creds) def single_mongos? %w(1 true yes).include?(ENV['SINGLE_MONGOS']) end + + # serverless is deprecated, but it still gets called from some places + # (see Mrss::Constraints), etc. + module DeprecatedServerless + def serverless? + false + end + end + + prepend DeprecatedServerless end From 2b7e4b2bb64fdeb3caf3576c2bb6c8b50bd6418a Mon Sep 17 00:00:00 2001 From: Dmitry Rybakov <160598371+comandeo-mongo@users.noreply.github.com> Date: Thu, 4 Sep 2025 17:58:41 +0200 Subject: [PATCH 3/4] RUBY-3705 Skip tests that fail on latest (#2953) --- spec/mongo/index/view_spec.rb | 2 ++ spec/mongo/operation/drop_index_spec.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/spec/mongo/index/view_spec.rb b/spec/mongo/index/view_spec.rb index 1bab5470f5..5e009e27e3 100644 --- a/spec/mongo/index/view_spec.rb +++ b/spec/mongo/index/view_spec.rb @@ -38,6 +38,8 @@ describe '#drop_one' do + max_server_version '8.2.99' + let(:spec) do { another: -1 } end diff --git a/spec/mongo/operation/drop_index_spec.rb b/spec/mongo/operation/drop_index_spec.rb index 17d976d6cf..fac3da7207 100644 --- a/spec/mongo/operation/drop_index_spec.rb +++ b/spec/mongo/operation/drop_index_spec.rb @@ -5,6 +5,7 @@ describe Mongo::Operation::DropIndex do require_no_required_api_version + max_server_version '8.2.99' before do authorized_collection.indexes.drop_all From 7cce80eb0c7b9b00f21cbb3c75c140755de3a0d8 Mon Sep 17 00:00:00 2001 From: Dmitry Rybakov <160598371+comandeo-mongo@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:58:25 +0100 Subject: [PATCH 4/4] RUBY-3726 Use new toolchain (#2958) --------- Co-authored-by: Dmitry Rybakov --- .evergreen/config.yml | 61 ++++++------------- .evergreen/config/axes.yml.erb | 7 +-- .evergreen/config/common.yml.erb | 6 +- .evergreen/config/standard.yml.erb | 56 ++++++----------- .evergreen/run-tests-atlas-full.sh | 17 +++++- .evergreen/run-tests-atlas.sh | 17 +++++- .evergreen/run-tests-azure.sh | 14 ++++- .evergreen/run-tests-deployed-lambda.sh | 15 ++++- .evergreen/run-tests-ecs.sh | 15 ++++- .evergreen/run-tests-gcp.sh | 14 ++++- .evergreen/run-tests-kerberos-integration.sh | 17 +++++- .evergreen/run-tests-kerberos-unit.sh | 18 +++++- .evergreen/run-tests-serverless.sh | 15 ++++- .evergreen/run-tests.sh | 26 ++++++-- gemfiles/standard.rb | 1 + spec/integration/srv_monitoring_spec.rb | 1 + spec/integration/time_zone_querying_spec.rb | 2 + spec/integration/transaction_pinning_spec.rb | 2 + .../versioned_api_examples_spec.rb | 2 +- spec/shared | 2 +- 20 files changed, 197 insertions(+), 111 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 338139f77b..cb8ee8e449 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -179,7 +179,7 @@ functions: export AWS_DEFAULT_REGION="${fle_aws_region}" fi export CSOT_SPEC_TESTS=1 - TEST_CMD="bundle exec rspec spec/spec_tests/client_side_operations_timeout_spec.rb" \ + TEST_CMD="bundle exec rspec spec/spec_tests/client_side_operations_timeout_spec.rb --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml" \ .evergreen/run-tests.sh "export FLE credentials": @@ -341,7 +341,7 @@ functions: "upload test results": - command: attach.xunit_results params: - file: ./src/rspec.xml + file: ./src/tmp/*.xml "delete private environment": - command: shell.exec @@ -430,7 +430,7 @@ post: # Removed, causing timeouts # - func: "upload working dir" - func: "upload mo artifacts" - # - func: "upload test results" + - func: "upload test results" - func: "upload test results to s3" task_groups: @@ -761,11 +761,6 @@ axes: - id: "mongodb-version" display_name: MongoDB Version values: - - id: "latest" - display_name: "latest" - variables: - MONGODB_VERSION: "latest" - CRYPT_SHARED_VERSION: "latest" - id: "8.0" display_name: "8.0" variables: @@ -1064,7 +1059,7 @@ axes: values: - id: mmapv1 display_name: MMAPv1 - run_on: ubuntu1804-small + run_on: ubuntu2004-small variables: MMAPV1: 'true' @@ -1179,7 +1174,7 @@ buildvariants: matrix_spec: auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"] ruby: "ruby-3.3" - mongodb-version: ["latest", "8.0", "7.0"] + mongodb-version: ["8.0", "7.0"] topology: ["standalone", "replica-set", "sharded-cluster"] os: ubuntu2204 display_name: ${auth-and-ssl} ${ruby} db-${mongodb-version} ${topology} @@ -1189,7 +1184,7 @@ buildvariants: - matrix_name: "mongo-recent" matrix_spec: ruby: ["ruby-3.3", "ruby-3.2", "jruby-9.4"] - mongodb-version: ["latest", "8.0", "7.0"] + mongodb-version: ["8.0", "7.0"] topology: ["standalone", "replica-set", "sharded-cluster"] os: ubuntu2204 display_name: "${mongodb-version} ${os} ${topology} ${auth-and-ssl} ${ruby}" @@ -1208,10 +1203,10 @@ buildvariants: - matrix_name: "mongo-5.x" matrix_spec: - ruby: ["ruby-3.3", "ruby-3.2", "jruby-9.4"] + ruby: ["ruby-3.3", "ruby-3.2"] mongodb-version: ['5.0'] topology: ["standalone", "replica-set", "sharded-cluster"] - os: ubuntu1804 + os: ubuntu2004 display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" tasks: - name: "test-mlaunch" @@ -1219,17 +1214,7 @@ buildvariants: - matrix_name: "mongo-4.x" matrix_spec: ruby: ["ruby-3.0", "ruby-2.7"] - mongodb-version: ['4.4', '4.2', '4.0'] - topology: ["standalone", "replica-set", "sharded-cluster"] - os: ubuntu1804 - display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" - tasks: - - name: "test-mlaunch" - - - matrix_name: "mongo-3.6" - matrix_spec: - ruby: "ruby-2.7" - mongodb-version: ['3.6'] + mongodb-version: ['4.4', '4.2'] topology: ["standalone", "replica-set", "sharded-cluster"] os: ubuntu1804 display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" @@ -1301,17 +1286,6 @@ buildvariants: tasks: - name: "test-mlaunch" - - matrix_name: mmapv1 - matrix_spec: - ruby: "ruby-2.7" - mongodb-version: ['3.6', '4.0'] - topology: ["standalone", "replica-set", "sharded-cluster"] - storage-engine: mmapv1 - os: ubuntu1804 - display_name: "${mongodb-version} ${topology} mmapv1 ${ruby}" - tasks: - - name: "test-mlaunch" - - matrix_name: "lint" matrix_spec: lint: on @@ -1349,7 +1323,7 @@ buildvariants: matrix_spec: stress: on ruby: "ruby-2.7" - mongodb-version: ['4.2', '4.0', '3.6'] + mongodb-version: ['4.4', '4.2'] topology: replica-set os: ubuntu1804 display_name: "${mongodb-version} ${topology} stress ${ruby}" @@ -1798,10 +1772,11 @@ buildvariants: tasks: - name: test-atlas - - matrix_name: "aws-lambda" - matrix_spec: - ruby: 'ruby-3.2' - os: ubuntu2204 - display_name: "AWS Lambda" - tasks: - - name: test_aws_lambda_task_group +# https://jira.mongodb.org/browse/RUBY-3311 +# - matrix_name: "aws-lambda" +# matrix_spec: +# ruby: 'ruby-3.2' +# os: ubuntu2204 +# display_name: "AWS Lambda" +# tasks: +# - name: test_aws_lambda_task_group diff --git a/.evergreen/config/axes.yml.erb b/.evergreen/config/axes.yml.erb index 44e018f5de..dbb7dcdc98 100644 --- a/.evergreen/config/axes.yml.erb +++ b/.evergreen/config/axes.yml.erb @@ -13,11 +13,6 @@ axes: - id: "mongodb-version" display_name: MongoDB Version values: - - id: "latest" - display_name: "latest" - variables: - MONGODB_VERSION: "latest" - CRYPT_SHARED_VERSION: "latest" - id: "8.0" display_name: "8.0" variables: @@ -314,7 +309,7 @@ axes: values: - id: mmapv1 display_name: MMAPv1 - run_on: ubuntu1804-small + run_on: ubuntu2004-small variables: MMAPV1: 'true' diff --git a/.evergreen/config/common.yml.erb b/.evergreen/config/common.yml.erb index 85fddd3dd0..f5135a1f44 100644 --- a/.evergreen/config/common.yml.erb +++ b/.evergreen/config/common.yml.erb @@ -176,7 +176,7 @@ functions: export AWS_DEFAULT_REGION="${fle_aws_region}" fi export CSOT_SPEC_TESTS=1 - TEST_CMD="bundle exec rspec spec/spec_tests/client_side_operations_timeout_spec.rb" \ + TEST_CMD="bundle exec rspec spec/spec_tests/client_side_operations_timeout_spec.rb --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml" \ .evergreen/run-tests.sh "export FLE credentials": @@ -338,7 +338,7 @@ functions: "upload test results": - command: attach.xunit_results params: - file: ./src/rspec.xml + file: ./src/tmp/*.xml "delete private environment": - command: shell.exec @@ -427,7 +427,7 @@ post: # Removed, causing timeouts # - func: "upload working dir" - func: "upload mo artifacts" - # - func: "upload test results" + - func: "upload test results" - func: "upload test results to s3" task_groups: diff --git a/.evergreen/config/standard.yml.erb b/.evergreen/config/standard.yml.erb index d3eedb889d..efa8986faa 100644 --- a/.evergreen/config/standard.yml.erb +++ b/.evergreen/config/standard.yml.erb @@ -8,7 +8,9 @@ # these are used for testing against a few recent ruby versions recent_rubies = %w( ruby-3.3 ruby-3.2 jruby-9.4 ) - # this is a list of the most most recent 3.x and 2.x MRI ruby versions + recent_mri_rubies = %w( ruby-3.3 ruby-3.2 ) + + # this is a list of the most recent 3.x and 2.x MRI ruby versions sample_mri_rubies = %w( ruby-3.3 ruby-2.7 ) # as above, but including the most recent JRuby release @@ -33,12 +35,8 @@ # The latest stable version of MongoDB latest_stable_mdb = "8.0".inspect # so it gets quoted as a string - # A few of the most recent MongoDB versions - actual_and_upcoming_mdb = %w( latest 8.0 7.0 ) recent_mdb = %w( 8.0 7.0 ) - - all_dbs = %w(latest 8.0 7.0 6.0 5.0 4.4 4.2 4.0 3.6) %> buildvariants: @@ -56,7 +54,7 @@ buildvariants: matrix_spec: auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"] ruby: <%= latest_ruby %> - mongodb-version: <%= actual_and_upcoming_mdb %> + mongodb-version: <%= recent_mdb %> topology: <%= topologies %> os: ubuntu2204 display_name: ${auth-and-ssl} ${ruby} db-${mongodb-version} ${topology} @@ -66,7 +64,7 @@ buildvariants: - matrix_name: "mongo-recent" matrix_spec: ruby: <%= recent_rubies %> - mongodb-version: <%= actual_and_upcoming_mdb %> + mongodb-version: <%= recent_mdb %> topology: <%= topologies %> os: ubuntu2204 display_name: "${mongodb-version} ${os} ${topology} ${auth-and-ssl} ${ruby}" @@ -85,10 +83,10 @@ buildvariants: - matrix_name: "mongo-5.x" matrix_spec: - ruby: <%= recent_rubies %> + ruby: <%= recent_mri_rubies %> mongodb-version: ['5.0'] topology: <%= topologies %> - os: ubuntu1804 + os: ubuntu2004 display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" tasks: - name: "test-mlaunch" @@ -96,17 +94,7 @@ buildvariants: - matrix_name: "mongo-4.x" matrix_spec: ruby: <%= older_rubies %> - mongodb-version: ['4.4', '4.2', '4.0'] - topology: <%= topologies %> - os: ubuntu1804 - display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" - tasks: - - name: "test-mlaunch" - - - matrix_name: "mongo-3.6" - matrix_spec: - ruby: <%= supported_mri_ruby_2 %> - mongodb-version: ['3.6'] + mongodb-version: ['4.4', '4.2'] topology: <%= topologies %> os: ubuntu1804 display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}" @@ -178,17 +166,6 @@ buildvariants: tasks: - name: "test-mlaunch" - - matrix_name: mmapv1 - matrix_spec: - ruby: <%= supported_mri_ruby_2 %> - mongodb-version: ['3.6', '4.0'] - topology: <%= topologies %> - storage-engine: mmapv1 - os: ubuntu1804 - display_name: "${mongodb-version} ${topology} mmapv1 ${ruby}" - tasks: - - name: "test-mlaunch" - - matrix_name: "lint" matrix_spec: lint: on @@ -226,7 +203,7 @@ buildvariants: matrix_spec: stress: on ruby: <%= supported_mri_ruby_2 %> - mongodb-version: ['4.2', '4.0', '3.6'] + mongodb-version: ['4.4', '4.2'] topology: replica-set os: ubuntu1804 display_name: "${mongodb-version} ${topology} stress ${ruby}" @@ -523,10 +500,11 @@ buildvariants: tasks: - name: test-atlas - - matrix_name: "aws-lambda" - matrix_spec: - ruby: 'ruby-3.2' - os: ubuntu2204 - display_name: "AWS Lambda" - tasks: - - name: test_aws_lambda_task_group +# https://jira.mongodb.org/browse/RUBY-3311 +# - matrix_name: "aws-lambda" +# matrix_spec: +# ruby: 'ruby-3.2' +# os: ubuntu2204 +# display_name: "AWS Lambda" +# tasks: +# - name: test_aws_lambda_task_group diff --git a/.evergreen/run-tests-atlas-full.sh b/.evergreen/run-tests-atlas-full.sh index c292d73c82..99a8ed347a 100755 --- a/.evergreen/run-tests-atlas-full.sh +++ b/.evergreen/run-tests-atlas-full.sh @@ -8,14 +8,27 @@ set -ex set_env_vars set_env_python -set_env_ruby + +# Install rbenv and download the requested ruby version +rm -rf ~/.rbenv +git clone https://github.com/rbenv/rbenv.git ~/.rbenv +rm -rf ~/.rbenv/versions/ +curl --retry 3 -fL http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz |tar -xC $HOME/.rbenv/ -Jf - +export PATH="$HOME/.rbenv/bin:$PATH" +eval "$(rbenv init - bash)" +export FULL_RUBY_VERSION=$(ls ~/.rbenv/versions | head -n1) +rbenv global $FULL_RUBY_VERSION + +export JAVA_HOME=/opt/java/jdk21 +export JAVACMD=$JAVA_HOME/bin/java bundle_install ATLAS_URI=$MONGODB_URI \ KILL_ALL_SERVER_SESSIONS=0 \ EXAMPLE_TIMEOUT=600 \ - bundle exec rspec -fd spec/integration/search_indexes_prose_spec.rb + bundle exec rspec -fd spec/integration/search_indexes_prose_spec.rb \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml test_status=$? diff --git a/.evergreen/run-tests-atlas.sh b/.evergreen/run-tests-atlas.sh index 9f6e55d23d..2b2298c48a 100755 --- a/.evergreen/run-tests-atlas.sh +++ b/.evergreen/run-tests-atlas.sh @@ -8,7 +8,19 @@ set -ex set_env_vars set_env_python -set_env_ruby + +# Install rbenv and download the requested ruby version +rm -rf ~/.rbenv +git clone https://github.com/rbenv/rbenv.git ~/.rbenv +rm -rf ~/.rbenv/versions/ +curl --retry 3 -fL http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz |tar -xC $HOME/.rbenv/ -Jf - +export PATH="$HOME/.rbenv/bin:$PATH" +eval "$(rbenv init - bash)" +export FULL_RUBY_VERSION=$(ls ~/.rbenv/versions | head -n1) +rbenv global $FULL_RUBY_VERSION + +export JAVA_HOME=/opt/java/jdk21 +export JAVACMD=$JAVA_HOME/bin/java bundle_install @@ -16,4 +28,5 @@ echo "Running specs" export ATLAS_TESTING=1 -bundle exec rspec spec/atlas -fd +bundle exec rspec spec/atlas \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml diff --git a/.evergreen/run-tests-azure.sh b/.evergreen/run-tests-azure.sh index 93d522f155..18cd5f3824 100755 --- a/.evergreen/run-tests-azure.sh +++ b/.evergreen/run-tests-azure.sh @@ -8,7 +8,19 @@ set -ex set_env_vars set_env_python -set_env_ruby + +# Install rbenv and download the requested ruby version +rm -rf ~/.rbenv +git clone https://github.com/rbenv/rbenv.git ~/.rbenv +rm -rf ~/.rbenv/versions/ +curl --retry 3 -fL http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz |tar -xC $HOME/.rbenv/ -Jf - +export PATH="$HOME/.rbenv/bin:$PATH" +eval "$(rbenv init - bash)" +export FULL_RUBY_VERSION=$(ls ~/.rbenv/versions | head -n1) +rbenv global $FULL_RUBY_VERSION + +export JAVA_HOME=/opt/java/jdk21 +export JAVACMD=$JAVA_HOME/bin/java sudo apt-get -y install libyaml-dev cmake diff --git a/.evergreen/run-tests-deployed-lambda.sh b/.evergreen/run-tests-deployed-lambda.sh index 7e2a2f4832..8a700e8eab 100755 --- a/.evergreen/run-tests-deployed-lambda.sh +++ b/.evergreen/run-tests-deployed-lambda.sh @@ -8,7 +8,20 @@ set -ex set_env_vars set_env_python -set_env_ruby + + +# Install rbenv and download the requested ruby version +rm -rf ~/.rbenv +git clone https://github.com/rbenv/rbenv.git ~/.rbenv +rm -rf ~/.rbenv/versions/ +curl --retry 3 -fL http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz |tar -xC $HOME/.rbenv/ -Jf - +export PATH="$HOME/.rbenv/bin:$PATH" +eval "$(rbenv init - bash)" +export FULL_RUBY_VERSION=$(ls ~/.rbenv/versions | head -n1) +rbenv global $FULL_RUBY_VERSION + +export JAVA_HOME=/opt/java/jdk21 +export JAVACMD=$JAVA_HOME/bin/java export MONGODB_URI=${MONGODB_URI} export CLUSTER_PREFIX="ruby-driver-" diff --git a/.evergreen/run-tests-ecs.sh b/.evergreen/run-tests-ecs.sh index ec93c3f36b..adea6939a7 100755 --- a/.evergreen/run-tests-ecs.sh +++ b/.evergreen/run-tests-ecs.sh @@ -17,7 +17,20 @@ show_local_instructions set_home set_env_vars set_env_python -set_env_ruby + + +# Install rbenv and download the requested ruby version +rm -rf ~/.rbenv +git clone https://github.com/rbenv/rbenv.git ~/.rbenv +rm -rf ~/.rbenv/versions/ +curl --retry 3 -fL http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz |tar -xC $HOME/.rbenv/ -Jf - +export PATH="$HOME/.rbenv/bin:$PATH" +eval "$(rbenv init - bash)" +export FULL_RUBY_VERSION=$(ls ~/.rbenv/versions | head -n1) +rbenv global $FULL_RUBY_VERSION + +export JAVA_HOME=/opt/java/jdk21 +export JAVACMD=$JAVA_HOME/bin/java bundle install --quiet diff --git a/.evergreen/run-tests-gcp.sh b/.evergreen/run-tests-gcp.sh index baccf6404b..e8990dc375 100755 --- a/.evergreen/run-tests-gcp.sh +++ b/.evergreen/run-tests-gcp.sh @@ -9,7 +9,19 @@ set -ex set_env_vars set_env_python -set_env_ruby + +# Install rbenv and download the requested ruby version +rm -rf ~/.rbenv +git clone https://github.com/rbenv/rbenv.git ~/.rbenv +rm -rf ~/.rbenv/versions/ +curl --retry 3 -fL http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz |tar -xC $HOME/.rbenv/ -Jf - +export PATH="$HOME/.rbenv/bin:$PATH" +eval "$(rbenv init - bash)" +export FULL_RUBY_VERSION=$(ls ~/.rbenv/versions | head -n1) +rbenv global $FULL_RUBY_VERSION + +export JAVA_HOME=/opt/java/jdk21 +export JAVACMD=$JAVA_HOME/bin/java sudo apt-get -y install libyaml-dev cmake diff --git a/.evergreen/run-tests-kerberos-integration.sh b/.evergreen/run-tests-kerberos-integration.sh index b56e22ec1a..51c44c35ba 100755 --- a/.evergreen/run-tests-kerberos-integration.sh +++ b/.evergreen/run-tests-kerberos-integration.sh @@ -19,7 +19,19 @@ show_local_instructions set_env_vars set_env_python -set_env_ruby + +# Install rbenv and download the requested ruby version +rm -rf ~/.rbenv +git clone https://github.com/rbenv/rbenv.git ~/.rbenv +rm -rf ~/.rbenv/versions/ +curl --retry 3 -fL http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz |tar -xC $HOME/.rbenv/ -Jf - +export PATH="$HOME/.rbenv/bin:$PATH" +eval "$(rbenv init - bash)" +export FULL_RUBY_VERSION=$(ls ~/.rbenv/versions | head -n1) +rbenv global $FULL_RUBY_VERSION + +export JAVA_HOME=/opt/java/jdk21 +export JAVACMD=$JAVA_HOME/bin/java # Note that: # @@ -86,5 +98,6 @@ if test -n "$TEST_CMD"; then eval $TEST_CMD else echo "Running tests" - bundle exec rspec spec/kerberos + bundle exec rspec spec/kerberos \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml fi diff --git a/.evergreen/run-tests-kerberos-unit.sh b/.evergreen/run-tests-kerberos-unit.sh index a9a7f77c58..4a3121e7b9 100755 --- a/.evergreen/run-tests-kerberos-unit.sh +++ b/.evergreen/run-tests-kerberos-unit.sh @@ -16,8 +16,21 @@ show_local_instructions set_env_vars set_env_python -set_env_ruby + +# Install rbenv and download the requested ruby version +rm -rf ~/.rbenv +git clone https://github.com/rbenv/rbenv.git ~/.rbenv +rm -rf ~/.rbenv/versions/ +curl --retry 3 -fL http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz |tar -xC $HOME/.rbenv/ -Jf - +export PATH="$HOME/.rbenv/bin:$PATH" +eval "$(rbenv init - bash)" +export FULL_RUBY_VERSION=$(ls ~/.rbenv/versions | head -n1) +rbenv global $FULL_RUBY_VERSION + +export JAVA_HOME=/opt/java/jdk21 + +export JAVACMD=$JAVA_HOME/bin/java export BUNDLE_GEMFILE=gemfiles/mongo_kerberos.gemfile bundle_install @@ -28,4 +41,5 @@ bundle exec rspec \ spec/spec_tests/connection_string_spec.rb \ spec/mongo/uri/srv_protocol_spec.rb \ spec/mongo/uri_spec.rb \ - spec/integration/client_authentication_options_spec.rb + spec/integration/client_authentication_options_spec.rb \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml diff --git a/.evergreen/run-tests-serverless.sh b/.evergreen/run-tests-serverless.sh index e2447ba008..0459623a4b 100755 --- a/.evergreen/run-tests-serverless.sh +++ b/.evergreen/run-tests-serverless.sh @@ -8,7 +8,20 @@ set -ex set_env_vars set_env_python -set_env_ruby + + +# Install rbenv and download the requested ruby version +rm -rf ~/.rbenv +git clone https://github.com/rbenv/rbenv.git ~/.rbenv +rm -rf ~/.rbenv/versions/ +curl --retry 3 -fL http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz |tar -xC $HOME/.rbenv/ -Jf - +export PATH="$HOME/.rbenv/bin:$PATH" +eval "$(rbenv init - bash)" +export FULL_RUBY_VERSION=$(ls ~/.rbenv/versions | head -n1) +rbenv global $FULL_RUBY_VERSION + +export JAVA_HOME=/opt/java/jdk21 +export JAVACMD=$JAVA_HOME/bin/java source ${DRIVERS_TOOLS}/.evergreen/serverless/secrets-export.sh diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 6dfa54c343..27e02c3302 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -43,7 +43,19 @@ show_local_instructions set_home set_env_vars set_env_python -set_env_ruby + +# Install rbenv and download the requested ruby version +rm -rf ~/.rbenv +git clone https://github.com/rbenv/rbenv.git ~/.rbenv +rm -rf ~/.rbenv/versions/ +curl --retry 3 -fL http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-toolchain/library/`host_distro`/$RVM_RUBY.tar.xz |tar -xC $HOME/.rbenv/ -Jf - +export PATH="$HOME/.rbenv/bin:$PATH" +eval "$(rbenv init - bash)" +export FULL_RUBY_VERSION=$(ls ~/.rbenv/versions | head -n1) +rbenv global $FULL_RUBY_VERSION + +export JAVA_HOME=/opt/java/jdk21 +export JAVACMD=$JAVA_HOME/bin/java prepare_server @@ -337,13 +349,17 @@ set +e if test -n "$TEST_CMD"; then eval $TEST_CMD elif test "$FORK" = 1; then - bundle exec rspec spec/integration/fork*spec.rb spec/stress/fork*spec.rb + bundle exec rspec spec/integration/fork*spec.rb spec/stress/fork*spec.rb \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml elif test "$STRESS" = 1; then - bundle exec rspec spec/integration/fork*spec.rb spec/stress + bundle exec rspec spec/integration/fork*spec.rb spec/stress \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml elif test "$OCSP_VERIFIER" = 1; then - bundle exec rspec spec/integration/ocsp_verifier_spec.rb + bundle exec rspec spec/integration/ocsp_verifier_spec.rb \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml elif test -n "$OCSP_CONNECTIVITY"; then - bundle exec rspec spec/integration/ocsp_connectivity_spec.rb + bundle exec rspec spec/integration/ocsp_connectivity_spec.rb \ + --format Rfc::Riff --format RspecJunitFormatter --out tmp/rspec.xml elif test "$SOLO" = 1; then for attempt in `seq 10`; do echo "Attempt $attempt" diff --git a/gemfiles/standard.rb b/gemfiles/standard.rb index c8065b3a1b..f292aa23b3 100644 --- a/gemfiles/standard.rb +++ b/gemfiles/standard.rb @@ -54,6 +54,7 @@ def standard_dependencies gem 'concurrent-ruby', platforms: :jruby gem 'dotenv' gem 'childprocess' + gem 'rspec_junit_formatter' end group :development do diff --git a/spec/integration/srv_monitoring_spec.rb b/spec/integration/srv_monitoring_spec.rb index ffa58b053f..3da2f7fd09 100644 --- a/spec/integration/srv_monitoring_spec.rb +++ b/spec/integration/srv_monitoring_spec.rb @@ -6,6 +6,7 @@ describe 'SRV Monitoring' do clean_slate_for_all require_external_connectivity + require_mri context 'with SRV lookups mocked at Resolver' do let(:srv_result) do diff --git a/spec/integration/time_zone_querying_spec.rb b/spec/integration/time_zone_querying_spec.rb index 804fb2c17b..c4be40592f 100644 --- a/spec/integration/time_zone_querying_spec.rb +++ b/spec/integration/time_zone_querying_spec.rb @@ -4,6 +4,8 @@ require 'spec_helper' describe 'Time zone querying' do + require_mri + let(:collection) { authorized_client[:time_zone_querying] } before do diff --git a/spec/integration/transaction_pinning_spec.rb b/spec/integration/transaction_pinning_spec.rb index 31d5e534b5..ef2c1503fa 100644 --- a/spec/integration/transaction_pinning_spec.rb +++ b/spec/integration/transaction_pinning_spec.rb @@ -4,6 +4,8 @@ require 'spec_helper' describe 'Transaction pinning' do + require_mri + let(:client) { authorized_client.with(max_pool_size: 4) } let(:collection_name) { 'tx_pinning' } let(:collection) { client[collection_name] } diff --git a/spec/integration/versioned_api_examples_spec.rb b/spec/integration/versioned_api_examples_spec.rb index 6e6651530d..f172e9901f 100644 --- a/spec/integration/versioned_api_examples_spec.rb +++ b/spec/integration/versioned_api_examples_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' describe 'Versioned API examples' do - + require_mri # Until https://jira.mongodb.org/browse/RUBY-1768 is implemented, limit # the tests to simple configurations require_no_auth diff --git a/spec/shared b/spec/shared index 1017c94e4b..702f23f98b 160000 --- a/spec/shared +++ b/spec/shared @@ -1 +1 @@ -Subproject commit 1017c94e4b0962d3b68eced52566e700ae4e70b4 +Subproject commit 702f23f98b4be12fae3cf4d235a27a7985272251