BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
123bc1d5
Unverified
Commit
123bc1d5
authored
Dec 27, 2016
by
Yorick Peterse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rename projects spec so it doesn't hang
This spec would hang due to the use of transactions, and would incorrectly stub Thread.new.
parent
2f93259c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
rename_reserved_project_names_spec.rb
spec/migrations/rename_reserved_project_names_spec.rb
+5
-3
No files found.
spec/migrations/rename_reserved_project_names_spec.rb
View file @
123bc1d5
...
...
@@ -3,14 +3,16 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20161221153951_rename_reserved_project_names.rb'
)
describe
RenameReservedProjectNames
do
# This migration uses multiple threads, and thus different transactions. This
# means data created in this spec may not be visible to some threads. To work
# around this we use the TRUNCATE cleaning strategy.
describe
RenameReservedProjectNames
,
truncate:
true
do
let
(
:migration
)
{
described_class
.
new
}
let!
(
:project
)
{
create
(
:project
)
}
let!
(
:project
)
{
create
(
:
empty_
project
)
}
before
do
project
.
path
=
'projects'
project
.
save!
(
validate:
false
)
allow
(
Thread
).
to
receive
(
:new
).
and_yield
end
describe
'#up'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment