Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
e3d5cbc9
Unverified
Commit
e3d5cbc9
authored
7 years ago
by
Mikkel Nygaard Ravn
Committed by
GitHub
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make timeout more robust (#12969)
parent
a836201a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
create_test.dart
packages/flutter_tools/test/commands/create_test.dart
+12
-9
packages_test.dart
packages/flutter_tools/test/commands/packages_test.dart
+4
-2
No files found.
packages/flutter_tools/test/commands/create_test.dart
View file @
e3d5cbc9
...
...
@@ -22,6 +22,9 @@ import '../src/context.dart';
const
String
frameworkRevision
=
'12345678'
;
const
String
frameworkChannel
=
'omega'
;
const
Timeout
createProjectTimeout
=
const
Timeout
.
factor
(
2.0
);
const
Timeout
createProjectAndGetPackagesTimeout
=
const
Timeout
.
factor
(
10.0
);
void
main
(
)
{
group
(
'create'
,
()
{
Directory
temp
;
...
...
@@ -57,7 +60,7 @@ void main() {
'flutter_project.iml'
,
],
);
},
timeout:
c
onst
Timeout
.
factor
(
3.0
)
);
},
timeout:
c
reateProjectAndGetPackagesTimeout
);
testUsingContext
(
'kotlin/swift project'
,
()
async
{
return
_createProject
(
...
...
@@ -76,7 +79,7 @@ void main() {
'ios/Runner/main.m'
,
],
);
},
timeout:
c
onst
Timeout
.
factor
(
3.0
)
);
},
timeout:
c
reateProjectTimeout
);
testUsingContext
(
'package project'
,
()
async
{
return
_createAndAnalyzeProject
(
...
...
@@ -103,7 +106,7 @@ void main() {
'test/widget_test.dart'
,
],
);
},
timeout:
c
onst
Timeout
.
factor
(
3.0
)
);
},
timeout:
c
reateProjectAndGetPackagesTimeout
);
testUsingContext
(
'plugin project'
,
()
async
{
return
_createAndAnalyzeProject
(
...
...
@@ -123,7 +126,7 @@ void main() {
],
plugin:
true
,
);
},
timeout:
c
onst
Timeout
.
factor
(
3.0
)
);
},
timeout:
c
reateProjectAndGetPackagesTimeout
);
testUsingContext
(
'kotlin/swift plugin project'
,
()
async
{
return
_createProject
(
...
...
@@ -149,7 +152,7 @@ void main() {
],
plugin:
true
,
);
},
timeout:
c
onst
Timeout
.
factor
(
3.0
)
);
},
timeout:
c
reateProjectTimeout
);
testUsingContext
(
'plugin project with custom org'
,
()
async
{
return
_createProject
(
...
...
@@ -165,7 +168,7 @@ void main() {
],
plugin:
true
,
);
},
timeout:
c
onst
Timeout
.
factor
(
3.0
)
);
},
timeout:
c
reateProjectTimeout
);
testUsingContext
(
'project with-driver-test'
,
()
async
{
return
_createAndAnalyzeProject
(
...
...
@@ -173,7 +176,7 @@ void main() {
<
String
>[
'--with-driver-test'
],
<
String
>[
'lib/main.dart'
],
);
},
timeout:
c
onst
Timeout
.
factor
(
3.0
)
);
},
timeout:
c
reateProjectAndGetPackagesTimeout
);
// Verify content and formatting
testUsingContext
(
'content'
,
()
async
{
...
...
@@ -249,7 +252,7 @@ void main() {
overrides:
<
Type
,
Generator
>{
FlutterVersion:
()
=>
mockFlutterVersion
,
},
timeout:
c
onst
Timeout
.
factor
(
3.0
)
);
timeout:
c
reateProjectTimeout
);
// Verify that we can regenerate over an existing project.
testUsingContext
(
'can re-gen over existing project'
,
()
async
{
...
...
@@ -261,7 +264,7 @@ void main() {
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
projectDir
.
path
]);
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
projectDir
.
path
]);
},
timeout:
c
onst
Timeout
.
factor
(
3.0
)
);
},
timeout:
c
reateProjectTimeout
);
// Verify that we help the user correct an option ordering issue
testUsingContext
(
'produces sensible error message'
,
()
async
{
...
...
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/commands/packages_test.dart
View file @
e3d5cbc9
...
...
@@ -17,6 +17,8 @@ import 'package:test/test.dart';
import
'../src/common.dart'
;
import
'../src/context.dart'
;
const
Timeout
remotePubTimeout
=
const
Timeout
.
factor
(
10.0
);
void
main
(
)
{
Cache
.
disableLocking
();
group
(
'packages get/upgrade'
,
()
{
...
...
@@ -55,7 +57,7 @@ void main() {
final
String
projectPath
=
await
runCommand
(
'get'
);
expectExists
(
projectPath
,
'lib/main.dart'
);
expectExists
(
projectPath
,
'.packages'
);
},
timeout:
const
Timeout
.
factor
(
3.0
)
);
},
timeout:
remotePubTimeout
);
testUsingContext
(
'get --offline'
,
()
async
{
final
String
projectPath
=
await
runCommand
(
'get'
,
args:
<
String
>[
'--offline'
]);
...
...
@@ -67,7 +69,7 @@ void main() {
final
String
projectPath
=
await
runCommand
(
'upgrade'
);
expectExists
(
projectPath
,
'lib/main.dart'
);
expectExists
(
projectPath
,
'.packages'
);
},
timeout:
const
Timeout
.
factor
(
3.0
)
);
},
timeout:
remotePubTimeout
);
});
group
(
'packages test/pub'
,
()
{
...
...
This diff is collapsed.
Click to expand it.
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