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 test failure when MiqEvent is not yet defined #21010

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

Fryguy
Copy link
Member

@Fryguy Fryguy commented Feb 3, 2021

The test is checking that MiqEvents were raised to the queue when space
is not available for the backup/dump feature, however depending on test
loading order, it's possible that MiqEvent is not defined. The code
that raises the event has an explicit check for defined?(::MiqEvent)
because it can run outside of the Rails environment context from a rake
task.

This commit changes the test to ensure that the MiqEvent class is
defined, so we can verify that the event is raised.

Closes #20986

@Fryguy
Copy link
Member Author

Fryguy commented Feb 3, 2021

@jrafanie Please review.

The test is checking that MiqEvents were raised to the queue when space
is not available for the backup/dump feature, however depending on test
loading order, it's possible that MiqEvent is not defined.  The code
that raises the event has an explicit check for `defined?(::MiqEvent)`
because it can run outside of the Rails environment context from a rake
task.

This commit changes the test to ensure that the MiqEvent class is
defined, so we can verify that the event is raised.

Closes ManageIQ#20986
@Fryguy Fryguy force-pushed the fix_evm_database_ops_sproadic_bug branch 2 times, most recently from fff9dfb to a4be3a5 Compare February 3, 2021 16:33
@miq-bot
Copy link
Member

miq-bot commented Feb 3, 2021

Checked commit Fryguy@5f1be08 with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. 👍

@jrafanie
Copy link
Member

jrafanie commented Feb 3, 2021

👍 to merge when green

@jrafanie jrafanie merged commit e906b1d into ManageIQ:master Feb 3, 2021
@Fryguy Fryguy deleted the fix_evm_database_ops_sproadic_bug branch February 3, 2021 20:55
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.

Failing specs on local machine but not Travis
3 participants