Skip to content
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

More spec refactoring #299

Open
wants to merge 12 commits into
base: development
Choose a base branch
from
Open

More spec refactoring #299

wants to merge 12 commits into from

Conversation

mnovelo
Copy link
Collaborator

@mnovelo mnovelo commented Oct 30, 2024

Copy link

codecov bot commented Oct 30, 2024

❌ 412 Tests Failed:

Tests completed Failed Passed Skipped
412 412 0 0
View the top 3 failed tests by shortest run time
spec.apartment.adapters.postgresql_adapter_spec Apartment::Adapters::PostgresqlAdapter when using connections behaves like handles concurrent connection operations fiber scheduling maintains tenant context in fiber scheduler
Stack Traces | 0.000115s run time
Failure/Error: raise ConnectionNotEstablished, message

ActiveRecord::ConnectionNotEstablished:
  No connection pool for 'ActiveRecord::Base' found.
Shared Example Group: "handles concurrent connection operations" called from ..../apartment/adapters/postgresql_adapter_spec.rb:62
.../bundle/ruby/3.2.0/gems/activerecord-7.2.2..../connection_adapters/abstract/connection_handler.rb:224:in `retrieve_connection_pool'
.../bundle/ruby/3.2.0/gems/activerecord-7.2.2..../lib/active_record/connection_handling.rb:329:in `connection_pool'
.../bundle/ruby/3.2.0/gems/activerecord-7.2.2..../lib/active_record/fixtures.rb:601:in `create_fixtures'
.../bundle/ruby/3.2.0/gems/activerecord-7.2.2..../lib/active_record/test_fixtures.rb:245:in `load_fixtures'
.../bundle/ruby/3.2.0/gems/activerecord-7.2.2..../lib/active_record/test_fixtures.rb:138:in `setup_fixtures'
.../bundle/ruby/3.2.0/gems/activerecord-7.2.2..../lib/active_record/test_fixtures.rb:10:in `before_setup'
.../bundle/ruby/3.2.0/gems/rspec-rails-7.1..../rspec/rails/adapters.rb:74:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example.rb:457:in `instance_exec'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example.rb:457:in `instance_exec'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/hooks.rb:390:in `execute_with'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example.rb:352:in `call'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/hooks.rb:629:in `run_around_example_hooks_for'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/hooks.rb:486:in `run'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example.rb:468:in `with_around_example_hooks'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example.rb:259:in `run'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:646:in `block in run_examples'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:642:in `map'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:642:in `run_examples'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:607:in `run'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `block in run'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `map'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `run'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `block in run'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `map'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `run'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `block in run'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `map'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `run'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/runner.rb:121:in `block (3 levels) in run_specs'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/runner.rb:121:in `map'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/runner.rb:121:in `block (2 levels) in run_specs'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/configuration.rb:2097:in `with_suite_hooks'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/runner.rb:116:in `block in run_specs'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/reporter.rb:74:in `report'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/runner.rb:115:in `run_specs'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/runner.rb:89:in `run'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/runner.rb:71:in `run'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13..../rspec/core/runner.rb:45:in `invoke'
.../bundle/ruby/3.2.0/gems/rspec-core-3.13.2/exe/rspec:4:in `<top (required)>'
.../bundle/ruby/3.2.0/bin/rspec:25:in `load'
.../bundle/ruby/3.2.0/bin/rspec:25:in `<top (required)>'
.../hostedtoolcache/Ruby/3.2.6.../lib/ruby/3.2.0........./bundler/cli/exec.rb:58:in `load'
.../hostedtoolcache/Ruby/3.2.6.../lib/ruby/3.2.0........./bundler/cli/exec.rb:58:in `kernel_load'
.../hostedtoolcache/Ruby/3.2.6.../lib/ruby/3.2.0........./bundler/cli/exec.rb:23:in `run'
.../hostedtoolcache/Ruby/3.2.6.../lib/ruby/3.2.0/bundler/cli.rb:492:in `exec'
.../hostedtoolcache/Ruby/3.2.6.../lib/ruby/3.2.0.../lib/thor/command.rb:27:in `run'
.../hostedtoolcache/Ruby/3.2.6.../lib/ruby/3.2.0.../lib/thor/invocation.rb:127:in `invoke_command'
.../hostedtoolcache/Ruby/3.2.6.../lib/ruby/3.2.0.../thor/lib/thor.rb:392:in `dispatch'
.../hostedtoolcache/Ruby/3.2.6.../lib/ruby/3.2.0/bundler/cli.rb:34:in `dispatch'
.../hostedtoolcache/Ruby/3.2.6.../lib/ruby/3.2.0.../lib/thor/base.rb:485:in `start'
.../hostedtoolcache/Ruby/3.2.6.../lib/ruby/3.2.0/bundler/cli.rb:28:in `start'
.../hostedtoolcache/Ruby/3.2.6.../ruby/gems/3.2.0/gems/bundler-2.4.19/libexec/bundle:37:in `block in <top (required)>'
.../hostedtoolcache/Ruby/3.2.6.../lib/ruby/3.2.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
.../hostedtoolcache/Ruby/3.2.6.../ruby/gems/3.2.0/gems/bundler-2.4.19/libexec/bundle:29:in `<top (required)>'
.../hostedtoolcache/Ruby/3.2.6....../x64/bin/bundle:25:in `load'
.../hostedtoolcache/Ruby/3.2.6....../x64/bin/bundle:25:in `<main>'

  Showing full backtrace because every line was filtered out.
  See docs for RSpec::Configuration#backtrace_exclusion_patterns and
  RSpec::Configuration#backtrace_inclusion_patterns for more information.
spec.unit.config_spec Apartment#config sets active_record_log
Stack Traces | 0.000652s run time
Failure/Error: raise ConnectionNotEstablished, message

ActiveRecord::ConnectionNotEstablished:
  No connection pool for 'ActiveRecord::Base' found.
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../connection_adapters/abstract/connection_handler.rb:208:in `retrieve_connection'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/connection_handling.rb:313:in `retrieve_connection'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/connection_handling.rb:280:in `connection'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/fixtures.rb:560:in `block in create_fixtures'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/fixtures.rb:575:in `create_fixtures'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/test_fixtures.rb:275:in `load_fixtures'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/test_fixtures.rb:165:in `setup_fixtures'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/test_fixtures.rb:10:in `before_setup'
.../bundle/jruby/3.1.0/gems/rspec-rails-7.1..../rspec/rails/adapters.rb:74:in `block in MinitestLifecycleAdapter'
org/jruby/RubyBasicObject.java:2620:in `instance_exec'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example.rb:457:in `instance_exec'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/hooks.rb:390:in `execute_with'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/hooks.rb:628:in `block in run_around_example_hooks_for'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example.rb:352:in `call'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/hooks.rb:629:in `run_around_example_hooks_for'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/hooks.rb:486:in `run'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example.rb:468:in `with_around_example_hooks'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example.rb:259:in `run'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:646:in `block in run_examples'
org/jruby/RubyArray.java:2803:in `map'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:651:in `run_examples'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:607:in `run'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `block in run'
org/jruby/RubyArray.java:2803:in `map'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `run'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:121:in `block in run_specs'
org/jruby/RubyArray.java:2803:in `map'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:121:in `block in run_specs'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/configuration.rb:2097:in `with_suite_hooks'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:116:in `block in run_specs'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/reporter.rb:74:in `report'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:115:in `run_specs'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:89:in `run'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:71:in `run'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:45:in `invoke'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13.2/exe/rspec:4:in `<main>'
org/jruby/RubyKernel.java:1223:in `load'
.../bundle/jruby/3.1.0/bin/rspec:25:in `<main>'
org/jruby/RubyKernel.java:1223:in `load'
......................................./home/runner/.rubies/jruby-9.4.9..../bundler/cli/exec.rb:58:in `kernel_load'
......................................./home/runner/.rubies/jruby-9.4.9..../bundler/cli/exec.rb:23:in `run'
......................................./home/runner/.rubies/jruby-9.4.9..../stdlib/bundler/cli.rb:486:in `exec'
......................................./home/runner/.rubies/jruby-9.4.9..../lib/thor/command.rb:27:in `run'
......................................./home/runner/.rubies/jruby-9.4.9..../lib/thor/invocation.rb:127:in `invoke_command'
......................................./home/runner/.rubies/jruby-9.4.9..../thor/lib/thor.rb:392:in `dispatch'
......................................./home/runner/.rubies/jruby-9.4.9..../stdlib/bundler/cli.rb:31:in `dispatch'
......................................./home/runner/.rubies/jruby-9.4.9..../lib/thor/base.rb:485:in `start'
......................................./home/runner/.rubies/jruby-9.4.9..../stdlib/bundler/cli.rb:25:in `start'
......................................./home/runner/.rubies/jruby-9.4.9..../shared/gems/bundler-2.3.26/exe/bundle:48:in `block in <main>'
......................................./home/runner/.rubies/jruby-9.4.9..../stdlib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
......................................./home/runner/.rubies/jruby-9.4.9..../shared/gems/bundler-2.3.26/exe/bundle:36:in `<main>'
org/jruby/RubyKernel.java:1223:in `load'
......................................./home/runner/.rubies/jruby-9.4.9.0/bin/bundle:25:in `<main>'

  Showing full backtrace because every line was filtered out.
  See docs for RSpec::Configuration#backtrace_exclusion_patterns and
  RSpec::Configuration#backtrace_inclusion_patterns for more information.
spec.unit.config_spec Apartment#config sets tenant_presence_check
Stack Traces | 0.00066s run time
Failure/Error: raise ConnectionNotEstablished, message

ActiveRecord::ConnectionNotEstablished:
  No connection pool for 'ActiveRecord::Base' found.
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../connection_adapters/abstract/connection_handler.rb:208:in `retrieve_connection'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/connection_handling.rb:313:in `retrieve_connection'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/connection_handling.rb:280:in `connection'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/fixtures.rb:560:in `block in create_fixtures'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/fixtures.rb:575:in `create_fixtures'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/test_fixtures.rb:275:in `load_fixtures'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/test_fixtures.rb:165:in `setup_fixtures'
.../bundle/jruby/3.1.0/gems/activerecord-7.0.8..../lib/active_record/test_fixtures.rb:10:in `before_setup'
.../bundle/jruby/3.1.0/gems/rspec-rails-7.1..../rspec/rails/adapters.rb:74:in `block in MinitestLifecycleAdapter'
org/jruby/RubyBasicObject.java:2620:in `instance_exec'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example.rb:457:in `instance_exec'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/hooks.rb:390:in `execute_with'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/hooks.rb:628:in `block in run_around_example_hooks_for'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example.rb:352:in `call'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/hooks.rb:629:in `run_around_example_hooks_for'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/hooks.rb:486:in `run'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example.rb:468:in `with_around_example_hooks'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example.rb:511:in `with_around_and_singleton_context_hooks'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example.rb:259:in `run'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:646:in `block in run_examples'
org/jruby/RubyArray.java:2803:in `map'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:651:in `run_examples'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:607:in `run'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `block in run'
org/jruby/RubyArray.java:2803:in `map'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/example_group.rb:608:in `run'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:121:in `block in run_specs'
org/jruby/RubyArray.java:2803:in `map'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:121:in `block in run_specs'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/configuration.rb:2097:in `with_suite_hooks'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:116:in `block in run_specs'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/reporter.rb:74:in `report'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:115:in `run_specs'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:89:in `run'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:71:in `run'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13..../rspec/core/runner.rb:45:in `invoke'
.../bundle/jruby/3.1.0/gems/rspec-core-3.13.2/exe/rspec:4:in `<main>'
org/jruby/RubyKernel.java:1223:in `load'
.../bundle/jruby/3.1.0/bin/rspec:25:in `<main>'
org/jruby/RubyKernel.java:1223:in `load'
......................................./home/runner/.rubies/jruby-9.4.9..../bundler/cli/exec.rb:58:in `kernel_load'
......................................./home/runner/.rubies/jruby-9.4.9..../bundler/cli/exec.rb:23:in `run'
......................................./home/runner/.rubies/jruby-9.4.9..../stdlib/bundler/cli.rb:486:in `exec'
......................................./home/runner/.rubies/jruby-9.4.9..../lib/thor/command.rb:27:in `run'
......................................./home/runner/.rubies/jruby-9.4.9..../lib/thor/invocation.rb:127:in `invoke_command'
......................................./home/runner/.rubies/jruby-9.4.9..../thor/lib/thor.rb:392:in `dispatch'
......................................./home/runner/.rubies/jruby-9.4.9..../stdlib/bundler/cli.rb:31:in `dispatch'
......................................./home/runner/.rubies/jruby-9.4.9..../lib/thor/base.rb:485:in `start'
......................................./home/runner/.rubies/jruby-9.4.9..../stdlib/bundler/cli.rb:25:in `start'
......................................./home/runner/.rubies/jruby-9.4.9..../shared/gems/bundler-2.3.26/exe/bundle:48:in `block in <main>'
......................................./home/runner/.rubies/jruby-9.4.9..../stdlib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
......................................./home/runner/.rubies/jruby-9.4.9..../shared/gems/bundler-2.3.26/exe/bundle:36:in `<main>'
org/jruby/RubyKernel.java:1223:in `load'
......................................./home/runner/.rubies/jruby-9.4.9.0/bin/bundle:25:in `<main>'

  Showing full backtrace because every line was filtered out.
  See docs for RSpec::Configuration#backtrace_exclusion_patterns and
  RSpec::Configuration#backtrace_inclusion_patterns for more information.

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Copy link

github-actions bot commented Dec 6, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale label Dec 6, 2024
@github-actions github-actions bot closed this Dec 13, 2024
@github-actions github-actions bot deleted the man/spec-refactor branch December 13, 2024 01:45
@mnovelo mnovelo restored the man/spec-refactor branch December 13, 2024 13:47
@mnovelo mnovelo reopened this Dec 13, 2024
@github-actions github-actions bot removed the stale label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant