Skip to content
Snippets Groups Projects
Commit b7814205 authored by Paco Guzman's avatar Paco Guzman
Browse files

Ensure specs on sorting of issues in API are deterministic on MySQL

MySQL could not have support for millisecond precision, depends on the MySQL version 
so we just create issues in different seconds in a deterministic way
parent 45afdbef
Branches
Tags
1 merge request!6306Ensure specs on sorting of issues in API are deterministic on MySQL
Pipeline #
Loading
@@ -18,6 +18,7 @@ v 8.12.0 (unreleased)
Loading
@@ -18,6 +18,7 @@ v 8.12.0 (unreleased)
- Use Search::GlobalService.new in the `GET /projects/search/:query` endpoint - Use Search::GlobalService.new in the `GET /projects/search/:query` endpoint
- Fix pagination on user snippets page - Fix pagination on user snippets page
- Fix sorting of issues in API - Fix sorting of issues in API
- Ensure specs on sorting of issues in API are deterministic on MySQL
- Escape search term before passing it to Regexp.new !6241 (winniehell) - Escape search term before passing it to Regexp.new !6241 (winniehell)
- Fix pinned sidebar behavior in smaller viewports !6169 - Fix pinned sidebar behavior in smaller viewports !6169
- Change merge_error column from string to text type - Change merge_error column from string to text type
Loading
Loading
FactoryGirl.define do FactoryGirl.define do
sequence :issue_created_at do |n|
4.hours.ago + ( 2 * n ).seconds
end
factory :issue do factory :issue do
title title
author author
Loading
Loading
Loading
@@ -18,6 +18,7 @@ describe API::API, api: true do
Loading
@@ -18,6 +18,7 @@ describe API::API, api: true do
project: project, project: project,
state: :closed, state: :closed,
milestone: milestone, milestone: milestone,
created_at: generate(:issue_created_at),
updated_at: 3.hours.ago updated_at: 3.hours.ago
end end
let!(:confidential_issue) do let!(:confidential_issue) do
Loading
@@ -26,6 +27,7 @@ describe API::API, api: true do
Loading
@@ -26,6 +27,7 @@ describe API::API, api: true do
project: project, project: project,
author: author, author: author,
assignee: assignee, assignee: assignee,
created_at: generate(:issue_created_at),
updated_at: 2.hours.ago updated_at: 2.hours.ago
end end
let!(:issue) do let!(:issue) do
Loading
@@ -34,6 +36,7 @@ describe API::API, api: true do
Loading
@@ -34,6 +36,7 @@ describe API::API, api: true do
assignee: user, assignee: user,
project: project, project: project,
milestone: milestone, milestone: milestone,
created_at: generate(:issue_created_at),
updated_at: 1.hour.ago updated_at: 1.hour.ago
end end
let!(:label) do let!(:label) do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment