GitLab FOSS merge requestshttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests2017-03-16T14:10:22Zhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6804adjust metrics methods for calculating CPU time to match specs, add new specs...2017-03-16T14:10:22Zusername-removed-105310eric@sabel.hausadjust metrics methods for calculating CPU time to match specs, add new specs for fixnum case## What does this MR do?
I noticed an inconsistency with the intended output from https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/metrics/system.rb#L47-59
It states that it should return a Float, and the spec expects a fl...## What does this MR do?
I noticed an inconsistency with the intended output from https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/metrics/system.rb#L47-59
It states that it should return a Float, and the spec expects a float, however `:millisecond` will return a Fixnum. I just set the precondition of the argument to `:float_millisecond` per the documentation on `Process`
## Are there points in the code the reviewer needs to double check?
I've written specs to test when the `:millisecond` precision param is passed into the methods, other than that nothing really.
## Why was this MR needed?
The specs fail due to expecting a Float. I'm testing on Ubuntu 16.04
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added
- Tests
- [x] Added for this feature/bug
- [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?username-removed-105310eric@sabel.haususername-removed-105310eric@sabel.haushttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6752Remove `Sidekiq::Testing.fake!`2017-03-22T08:51:01Zusername-removed-760723Remove `Sidekiq::Testing.fake!`## What does this MR do?
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/22992
## Are there points in the code the reviewer needs to double check?
Its not possible to use `perform_enqueued_jobs` because the gitlab workers do...## What does this MR do?
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/22992
## Are there points in the code the reviewer needs to double check?
Its not possible to use `perform_enqueued_jobs` because the gitlab workers does not use ActiveJob API, gitlab sidekiq workers have to first migrate to ActiveJob, cf https://github.com/mperham/sidekiq/wiki/Active-Job
## Why was this MR needed?
See https://gitlab.com/gitlab-org/gitlab-ce/issues/22992
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
- [ ] Added for this feature/bug
- [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/22992username-removed-128633username-removed-128633