Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
63bb005d
Commit
63bb005d
authored
Nov 09, 2019
by
Greg Messner
Browse files
Increased timeout for exporting and importing projects.
parent
63f3ddaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/gitlab4j/api/TestImportExportApi.java
View file @
63bb005d
...
@@ -123,7 +123,7 @@ public class TestImportExportApi extends AbstractIntegrationTest {
...
@@ -123,7 +123,7 @@ public class TestImportExportApi extends AbstractIntegrationTest {
// Act
// Act
gitLabApi
.
getImportExportApi
().
scheduleExport
(
testProject
);
gitLabApi
.
getImportExportApi
().
scheduleExport
(
testProject
);
// Wait up to
2
0 seconds for the export to complete
// Wait up to
4
0 seconds for the export to complete
System
.
out
.
print
(
"Waiting for export to complete"
);
System
.
out
.
print
(
"Waiting for export to complete"
);
int
retries
=
0
;
int
retries
=
0
;
while
(
true
)
{
while
(
true
)
{
...
@@ -135,7 +135,7 @@ public class TestImportExportApi extends AbstractIntegrationTest {
...
@@ -135,7 +135,7 @@ public class TestImportExportApi extends AbstractIntegrationTest {
break
;
break
;
}
}
if
(
retries
>=
2
0
)
{
if
(
retries
>=
4
0
)
{
System
.
out
.
println
(
"aborting!"
);
System
.
out
.
println
(
"aborting!"
);
fail
(
"Project export is taking too long, failing test."
);
fail
(
"Project export is taking too long, failing test."
);
}
}
...
@@ -161,7 +161,7 @@ public class TestImportExportApi extends AbstractIntegrationTest {
...
@@ -161,7 +161,7 @@ public class TestImportExportApi extends AbstractIntegrationTest {
assertNotNull
(
importStatus
);
assertNotNull
(
importStatus
);
Integer
newProjectId
=
importStatus
.
getId
();
Integer
newProjectId
=
importStatus
.
getId
();
// Wait up to
2
0 seconds for the import to complete
// Wait up to
4
0 seconds for the import to complete
System
.
out
.
print
(
"Waiting for import to complete"
);
System
.
out
.
print
(
"Waiting for import to complete"
);
retries
=
0
;
retries
=
0
;
while
(
true
)
{
while
(
true
)
{
...
@@ -173,7 +173,7 @@ public class TestImportExportApi extends AbstractIntegrationTest {
...
@@ -173,7 +173,7 @@ public class TestImportExportApi extends AbstractIntegrationTest {
break
;
break
;
}
}
if
(
retries
>=
2
0
)
{
if
(
retries
>=
4
0
)
{
System
.
out
.
println
(
"aborting!"
);
System
.
out
.
println
(
"aborting!"
);
fail
(
"Project import is taking too long, failing test."
);
fail
(
"Project import is taking too long, failing test."
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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