-
Notifications
You must be signed in to change notification settings - Fork 5
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
FI-2222: no tests hang fix #425
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #425 +/- ##
==========================================
+ Coverage 77.06% 77.08% +0.02%
==========================================
Files 219 220 +1
Lines 10931 10945 +14
Branches 1026 1028 +2
==========================================
+ Hits 8424 8437 +13
- Misses 1928 1929 +1
Partials 579 579
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
tagging @Jammjammjamm and @arscan if they have any solutions |
The issue is that you haven't persisted a test run for that spec. Look at all the other spec groups which create a test run. |
This PR is ready assuming you accept the solution of marking 'omit' to all empty groups |
@@ -434,6 +437,28 @@ | |||
end | |||
end | |||
end | |||
|
|||
describe 'empty_group' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is test runner behavior, not test creation behavior, so it should be in the test runner spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I kept the 'contains zero tests' spec in anyways as a negative test, but let me know if I should move this too
Summary
[Draft PR](Ready)Running a test kit with an empty suite or an empty group causes the tests to run indefinitely. An empty test group (or suite) causes a sequel validation error that is raised in the job dispatched from Inferno web server handling
POST /inferno/api/test_runs
, but subsequentGET /inferno/api/test_runs/...
returnstatus: running
. Inferno server-side can't seem to handle exceptions raised by jobs outside of the DSL runtime. The recommended fix is to disable the run-test button on the UI, but this won't fix the API or core bug.This PR bypassed the issue by assigning an omitted result to all empty test groups, which unfreezes the UI and API but doesn't solve the core issue. It also makes the infrastructure test suite break rspec tests since an empty group violates SQL validations. I'm also not sure if adding an empty group to infrastructure test suite is okay. This PR will be a draft until this gets sorted out, and I appreciate any advice!
Testing Guidance
Checkout this branch and run the new empty test group in infrastructure test suite. You can also run
rake spec
which currently fails.Comment out lines 126 - 133 in lib/inferno/test_runner.rb to observe the original behavior.