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

Fix sporadic blacklist spec #23190

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Sep 17, 2024

Even though we stub_const for our classes (so they go away) It isn't for a number of gc cycles until it will get cleared up

in the meantime, it will be returned from Class#subclasses

Solution: punt. let it return from subclasses.

But put a more robust implementation into our temporary ExtManagementSystem So they behave properly and don't freak out the blacklist specs

Fixes #23152

reproducer:

SPEC_OPTS="--seed 3896" beer rspec spec/models/mixins/supports_feature_mixin_spec.rb spec/models/blacklisted_event_spec.rb

@kbrock
Copy link
Member Author

kbrock commented Sep 17, 2024

update:

  • removed extra tracker code that is no longer necessary (since we've upgraded to rails 7.0/ruby 3.1)
  • fix indentation/single line method definition (cops)

@kbrock
Copy link
Member Author

kbrock commented Sep 17, 2024

update:

  • fixed trailing whitespace

@Fryguy Fryguy self-assigned this Sep 17, 2024
@Fryguy Fryguy added the bug label Sep 17, 2024
@kbrock
Copy link
Member Author

kbrock commented Sep 17, 2024

update:

  • Documented why we defined blacklisted_event_names class.

update:

  • reworded comment/documentation.

Even though we stub_const for our classes (so they go away)
It isn't for a number of gc cycles until it will get cleared up

in the meantime, it will be returned from Class#subclasses

Solution: punt. let it return from subclasses.

But put a more robust implementation into our temporary ExtManagementSystem
So they behave properly and don't freak out the blacklist specs
@miq-bot
Copy link
Member

miq-bot commented Sep 18, 2024

Checked commit kbrock@c72f6c3 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. 🍰

@Fryguy Fryguy merged commit 92e8d0c into ManageIQ:master Sep 18, 2024
8 checks passed
@kbrock kbrock deleted the sporadic_blacklist_fix branch September 18, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sporadic test failures with SupportsFeatureMixin
3 participants