Skip to content

Commit

Permalink
move ci mode and concurrency test to contexts folder
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Jan 30, 2024
1 parent 49071fc commit d68c6d9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@

require_relative "../lib/datadog/ci"

# rspec helpers and matchers
require_relative "support/gems_helpers"
require_relative "support/log_helpers"
require_relative "support/tracer_helpers"
require_relative "support/span_helpers"
require_relative "support/platform_helpers"
require_relative "support/git_helpers"
require_relative "support/provider_test_helpers"
require_relative "support/ci_mode_helpers"
require_relative "support/test_visibility_event_serialized"
require_relative "support/concurrency_helpers"

# shared contexts
require_relative "support/contexts/ci_mode"
require_relative "support/contexts/concurrency_test"

require "rspec/collection_matchers"
require "climate_control"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# CI mode shared context sets up the CI recorder and configures the CI mode for tracer like customers do.
# Example usage:
#
# include_context "CI mode activated" do
# let(:integration_name) { :cucumber }
# let(:integration_options) { {service_name: "jalapenos"} }
# end

RSpec.shared_context "CI mode activated" do
let(:test_command) { "command" }
let(:integration_name) { :no_instrument }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Concurreny test shared context sets up the concurrency test environment.
#
# It provides some convenience methods to run code concurrently in tests, such as:
# - repeat: run a block of code multiple times
# - run_concurrently: run a block of code concurrently in multiple threads
RSpec.shared_context "Concurrency test" do
let(:threads_count) { 10 }
let(:repeat_count) { 20 }
Expand Down

0 comments on commit d68c6d9

Please sign in to comment.