Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d50fe9e4
Commit
d50fe9e4
authored
Mar 11, 2019
by
Paul Slaughter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update merge status timeout to 0
- Also stop polling if we get a bad response from the server.
parent
8c4d6ea2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
4 deletions
+31
-4
app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
...merge_request_widget/components/states/ready_to_merge.vue
+7
-3
changelogs/unreleased/56970-fix-mr-stuck-loading-on-error.yml
...gelogs/unreleased/56970-fix-mr-stuck-loading-on-error.yml
+5
-0
spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
...widget/components/states/mr_widget_ready_to_merge_spec.js
+19
-1
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
View file @
d50fe9e4
...
@@ -159,9 +159,12 @@ export default {
...
@@ -159,9 +159,12 @@ export default {
});
});
},
},
initiateMergePolling
()
{
initiateMergePolling
()
{
simplePoll
((
continuePolling
,
stopPolling
)
=>
{
simplePoll
(
(
continuePolling
,
stopPolling
)
=>
{
this
.
handleMergePolling
(
continuePolling
,
stopPolling
);
this
.
handleMergePolling
(
continuePolling
,
stopPolling
);
});
},
{
timeout
:
0
},
);
},
},
handleMergePolling
(
continuePolling
,
stopPolling
)
{
handleMergePolling
(
continuePolling
,
stopPolling
)
{
this
.
service
this
.
service
...
@@ -192,6 +195,7 @@ export default {
...
@@ -192,6 +195,7 @@ export default {
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
new
Flash
(
__
(
'
Something went wrong while merging this merge request. Please try again.
'
));
// eslint-disable-line
new
Flash
(
__
(
'
Something went wrong while merging this merge request. Please try again.
'
));
// eslint-disable-line
stopPolling
();
});
});
},
},
initiateRemoveSourceBranchPolling
()
{
initiateRemoveSourceBranchPolling
()
{
...
...
changelogs/unreleased/56970-fix-mr-stuck-loading-on-error.yml
0 → 100644
View file @
d50fe9e4
---
title
:
Disable timeout on merge request merging poll
merge_request
:
25988
author
:
type
:
fixed
spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
View file @
d50fe9e4
...
@@ -376,11 +376,29 @@ describe('ReadyToMerge', () => {
...
@@ -376,11 +376,29 @@ describe('ReadyToMerge', () => {
});
});
describe
(
'
initiateMergePolling
'
,
()
=>
{
describe
(
'
initiateMergePolling
'
,
()
=>
{
beforeEach
(()
=>
{
jasmine
.
clock
().
install
();
});
afterEach
(()
=>
{
jasmine
.
clock
().
uninstall
();
});
it
(
'
should call simplePoll
'
,
()
=>
{
it
(
'
should call simplePoll
'
,
()
=>
{
const
simplePoll
=
spyOnDependency
(
ReadyToMerge
,
'
simplePoll
'
);
const
simplePoll
=
spyOnDependency
(
ReadyToMerge
,
'
simplePoll
'
);
vm
.
initiateMergePolling
();
vm
.
initiateMergePolling
();
expect
(
simplePoll
).
toHaveBeenCalled
();
expect
(
simplePoll
).
toHaveBeenCalledWith
(
jasmine
.
any
(
Function
),
{
timeout
:
0
});
});
it
(
'
should call handleMergePolling
'
,
()
=>
{
spyOn
(
vm
,
'
handleMergePolling
'
);
vm
.
initiateMergePolling
();
jasmine
.
clock
().
tick
(
2000
);
expect
(
vm
.
handleMergePolling
).
toHaveBeenCalled
();
});
});
});
});
...
...
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