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
04721479
Commit
04721479
authored
Feb 08, 2018
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix last batch size equals max batch size error
parent
bf7412e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
prepare_untracked_uploads.rb
lib/gitlab/background_migration/prepare_untracked_uploads.rb
+1
-1
prepare_untracked_uploads_spec.rb
...ab/background_migration/prepare_untracked_uploads_spec.rb
+24
-0
No files found.
lib/gitlab/background_migration/prepare_untracked_uploads.rb
View file @
04721479
...
...
@@ -88,7 +88,7 @@ module Gitlab
end
end
yield
(
paths
)
yield
(
paths
)
if
paths
.
any?
end
def
build_find_command
(
search_dir
)
...
...
spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb
View file @
04721479
...
...
@@ -128,6 +128,18 @@ describe Gitlab::BackgroundMigration::PrepareUntrackedUploads, :sidekiq do
expect
(
untracked_files_for_uploads
.
count
).
to
eq
(
5
)
end
end
context
'when the last batch size exactly matches the max batch size'
do
it
'does not raise error'
do
stub_const
(
"
#{
described_class
}
::FIND_BATCH_SIZE"
,
5
)
expect
do
described_class
.
new
.
perform
end
.
not_to
raise_error
expect
(
untracked_files_for_uploads
.
count
).
to
eq
(
5
)
end
end
end
end
...
...
@@ -216,6 +228,18 @@ describe Gitlab::BackgroundMigration::PrepareUntrackedUploads, :sidekiq do
expect
(
untracked_files_for_uploads
.
count
).
to
eq
(
5
)
end
end
context
'when the last batch size exactly matches the max batch size'
do
it
'does not raise error'
do
stub_const
(
"
#{
described_class
}
::FIND_BATCH_SIZE"
,
5
)
expect
do
described_class
.
new
.
perform
end
.
not_to
raise_error
expect
(
untracked_files_for_uploads
.
count
).
to
eq
(
5
)
end
end
end
end
...
...
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