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
f4a4f6e2
Commit
f4a4f6e2
authored
Jul 12, 2019
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix page refresh in retry_until
parent
0b71325d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
qa/qa/page/base.rb
qa/qa/page/base.rb
+1
-1
qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb
...a/specs/features/browser_ui/1_manage/login/log_in_spec.rb
+1
-1
qa/qa/support/retrier.rb
qa/qa/support/retrier.rb
+3
-3
No files found.
qa/qa/page/base.rb
View file @
f4a4f6e2
...
@@ -26,7 +26,7 @@ module QA
...
@@ -26,7 +26,7 @@ module QA
end
end
def
retry_until
(
max_attempts:
3
,
reload:
false
,
sleep_interval:
0
)
def
retry_until
(
max_attempts:
3
,
reload:
false
,
sleep_interval:
0
)
QA
::
Support
::
Retrier
.
retry_until
(
max_attempts:
max_attempts
,
reload
:
reload
,
sleep_interval:
sleep_interval
)
do
QA
::
Support
::
Retrier
.
retry_until
(
max_attempts:
max_attempts
,
reload
_page:
(
reload
&&
self
)
,
sleep_interval:
sleep_interval
)
do
yield
yield
end
end
end
end
...
...
qa/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb
View file @
f4a4f6e2
...
@@ -11,7 +11,7 @@ module QA
...
@@ -11,7 +11,7 @@ module QA
expect
(
menu
).
to
have_personal_area
expect
(
menu
).
to
have_personal_area
end
end
Support
::
Retrier
.
retry_until
(
reload:
false
,
sleep_interval:
0.5
)
do
Support
::
Retrier
.
retry_until
(
sleep_interval:
0.5
)
do
Page
::
Main
::
Menu
.
perform
(
&
:sign_out
)
Page
::
Main
::
Menu
.
perform
(
&
:sign_out
)
Page
::
Main
::
Login
.
perform
(
&
:has_sign_in_tab?
)
Page
::
Main
::
Login
.
perform
(
&
:has_sign_in_tab?
)
...
...
qa/qa/support/retrier.rb
View file @
f4a4f6e2
...
@@ -24,8 +24,8 @@ module QA
...
@@ -24,8 +24,8 @@ module QA
end
end
end
end
def
retry_until
(
max_attempts:
3
,
reload
:
false
,
sleep_interval:
0
)
def
retry_until
(
max_attempts:
3
,
reload
_page:
nil
,
sleep_interval:
0
)
QA
::
Runtime
::
Logger
.
debug
(
"with retry_until: max_attempts
#{
max_attempts
}
; sleep_interval
#{
sleep_interval
}
; reload
:
#{
reload
}
"
)
QA
::
Runtime
::
Logger
.
debug
(
"with retry_until: max_attempts
#{
max_attempts
}
; sleep_interval
#{
sleep_interval
}
; reload
_page:
#{
reload_page
}
"
)
attempts
=
0
attempts
=
0
while
attempts
<
max_attempts
while
attempts
<
max_attempts
...
@@ -35,7 +35,7 @@ module QA
...
@@ -35,7 +35,7 @@ module QA
sleep
sleep_interval
sleep
sleep_interval
re
fresh
if
reload
re
load_page
.
refresh
if
reload_page
attempts
+=
1
attempts
+=
1
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