-
Notifications
You must be signed in to change notification settings - Fork 289
Refactor: Reorganize tests and move ActiveJob to Rails-compliant paths #902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
d24bcd7
Refactor: Reorganize tests and move ActiveJob to Rails-compliant paths
mensfeld 94930e5
changes sync
mensfeld 9b3c37e
version syncs
mensfeld 391e568
use-case specs
mensfeld 19eeb27
fix req
mensfeld 8732cd5
remarks
mensfeld 6924043
Skip integration tests when dependencies unavailable
mensfeld 410ff38
Fix bundler env inheritance in integration tests
mensfeld 786957a
Use isolated bundle path for integration tests
mensfeld fd34310
Show bundle install output for skipped tests
mensfeld 746212a
Create isolated bundle config for integration tests
mensfeld 100c6f6
Use ruby -rbundler/setup to avoid bundle exec config issues
mensfeld 97e11eb
Use bundle standalone for isolated integration test deps
mensfeld e85bf38
Clear RUBYOPT to avoid bundler auto-load in CI
mensfeld a0ec431
Use Bundler.with_unbundled_env for isolated bundle install
mensfeld f95ab6b
remarks
mensfeld af9aa3f
cleanup
mensfeld c131641
remarks
mensfeld 39c0fdb
Add enqueue_all for bulk ActiveJob and new integration tests
mensfeld 2b4b27e
Remove shebang and redundant requires from integration specs
mensfeld 1ac9227
Only load ActiveJob in specs that need it
mensfeld 460fa70
Remove double blank lines from integration specs
mensfeld 9189edd
Add enqueue_all to CHANGELOG
mensfeld c9cc123
Add active_job/extensions require to ActiveJob specs
mensfeld a062a2a
Add DataCollector (DT) for thread-safe test data collection
mensfeld bd828b0
Use DT pattern in all applicable integration specs
mensfeld 6a61766
Add CurrentAttributes persistence support
mensfeld 79458a5
Expand CurrentAttributes integration tests
mensfeld 54a06c5
Fix middleware_chain spec: use &block instead of yield in define_method
mensfeld bfd41c4
Simplify integration test setup
mensfeld b4e3558
Add E2E tests for ActiveJob retry/discard and custom attributes
mensfeld 5a7d930
Add setup_active_job helper and bin/clean_localstack cleanup script
mensfeld 6c3c8d4
Remove unnecessary error handling from clean_localstack
mensfeld e0c26f9
Remove obvious comments and fix assertion style in integration specs
mensfeld ce21b79
Reorganize integration specs into granular single-scenario files
mensfeld c3defc9
Remove redundant minimumReleaseAge rule for github-actions
mensfeld 0857089
Merge main branch and add Rails specs CI job
mensfeld c49dbe7
Remove rails_specs job that requires missing gemfiles
mensfeld b0ea3ad
Split CI into separate Specs and Integrations jobs
mensfeld e1c7812
Address PR review comments
mensfeld File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| --color | ||
| --require spec_helper | ||
| --exclude-pattern "spec/integration/**/*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| #!/usr/bin/env ruby | ||
| # frozen_string_literal: true | ||
|
|
||
| # Removes all integration test SQS queues from LocalStack | ||
| # | ||
| # Useful when having a long-running LocalStack instance that cannot be fully | ||
| # restarted between test runs. All integration test queues use the 'it-' prefix, | ||
| # making them easy to identify and remove. | ||
| # | ||
| # Usage: | ||
| # bin/clean_localstack | ||
|
|
||
| require 'aws-sdk-sqs' | ||
|
|
||
| THREADS_COUNT = 3 | ||
|
|
||
| sqs = Aws::SQS::Client.new( | ||
| region: 'us-east-1', | ||
| endpoint: 'http://localhost:4566', | ||
| access_key_id: 'fake', | ||
| secret_access_key: 'fake' | ||
| ) | ||
|
|
||
| # Find all queues with 'it-' prefix | ||
| response = sqs.list_queues(queue_name_prefix: 'it-') | ||
| queues_for_removal = response.queue_urls || [] | ||
|
|
||
| if queues_for_removal.empty? | ||
| puts "No integration test queues found (prefix: it-)" | ||
| exit 0 | ||
| end | ||
|
|
||
| puts "Found #{queues_for_removal.size} queues to remove" | ||
|
|
||
| queue = SizedQueue.new(THREADS_COUNT) | ||
|
|
||
| threads = Array.new(THREADS_COUNT) do | ||
| Thread.new do | ||
| while (queue_url = queue.pop) | ||
| queue_name = queue_url.split('/').last | ||
| puts "Removing queue: #{queue_name}" | ||
| sqs.delete_queue(queue_url: queue_url) | ||
| end | ||
| end | ||
| end | ||
|
|
||
| queues_for_removal.each { |url| queue << url } | ||
|
|
||
| queue.close | ||
| threads.each(&:join) | ||
|
|
||
| puts "Cleanup complete" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.