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
c936aa8c
Unverified
Commit
c936aa8c
authored
Nov 10, 2017
by
Mikkel Nygaard Ravn
Committed by
GitHub
Nov 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
One more timeout. Centralize definitions. (#12970)
parent
e3d5cbc9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
18 deletions
+20
-18
analyze_once_test.dart
packages/flutter_tools/test/commands/analyze_once_test.dart
+1
-1
create_test.dart
packages/flutter_tools/test/commands/create_test.dart
+9
-12
packages_test.dart
packages/flutter_tools/test/commands/packages_test.dart
+2
-4
common.dart
packages/flutter_tools/test/src/common.dart
+8
-1
No files found.
packages/flutter_tools/test/commands/analyze_once_test.dart
View file @
c936aa8c
...
...
@@ -47,7 +47,7 @@ void main() {
],
);
expect
(
libMain
.
existsSync
(),
isTrue
);
});
}
,
timeout:
allowForRemotePubInvocation
);
// Analyze in the current directory - no arguments
testUsingContext
(
'flutter analyze working directory'
,
()
async
{
...
...
packages/flutter_tools/test/commands/create_test.dart
View file @
c936aa8c
...
...
@@ -22,9 +22,6 @@ 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
;
...
...
@@ -60,7 +57,7 @@ void main() {
'flutter_project.iml'
,
],
);
},
timeout:
createProjectAndGetPackagesTimeout
);
},
timeout:
allowForRemotePubInvocation
);
testUsingContext
(
'kotlin/swift project'
,
()
async
{
return
_createProject
(
...
...
@@ -79,7 +76,7 @@ void main() {
'ios/Runner/main.m'
,
],
);
},
timeout:
createProjectTimeou
t
);
},
timeout:
allowForCreateFlutterProjec
t
);
testUsingContext
(
'package project'
,
()
async
{
return
_createAndAnalyzeProject
(
...
...
@@ -106,7 +103,7 @@ void main() {
'test/widget_test.dart'
,
],
);
},
timeout:
createProjectAndGetPackagesTimeout
);
},
timeout:
allowForRemotePubInvocation
);
testUsingContext
(
'plugin project'
,
()
async
{
return
_createAndAnalyzeProject
(
...
...
@@ -126,7 +123,7 @@ void main() {
],
plugin:
true
,
);
},
timeout:
createProjectAndGetPackagesTimeout
);
},
timeout:
allowForRemotePubInvocation
);
testUsingContext
(
'kotlin/swift plugin project'
,
()
async
{
return
_createProject
(
...
...
@@ -152,7 +149,7 @@ void main() {
],
plugin:
true
,
);
},
timeout:
createProjectTimeou
t
);
},
timeout:
allowForCreateFlutterProjec
t
);
testUsingContext
(
'plugin project with custom org'
,
()
async
{
return
_createProject
(
...
...
@@ -168,7 +165,7 @@ void main() {
],
plugin:
true
,
);
},
timeout:
createProjectTimeou
t
);
},
timeout:
allowForCreateFlutterProjec
t
);
testUsingContext
(
'project with-driver-test'
,
()
async
{
return
_createAndAnalyzeProject
(
...
...
@@ -176,7 +173,7 @@ void main() {
<
String
>[
'--with-driver-test'
],
<
String
>[
'lib/main.dart'
],
);
},
timeout:
createProjectAndGetPackagesTimeout
);
},
timeout:
allowForRemotePubInvocation
);
// Verify content and formatting
testUsingContext
(
'content'
,
()
async
{
...
...
@@ -252,7 +249,7 @@ void main() {
overrides:
<
Type
,
Generator
>{
FlutterVersion:
()
=>
mockFlutterVersion
,
},
timeout:
createProjectTimeou
t
);
timeout:
allowForCreateFlutterProjec
t
);
// Verify that we can regenerate over an existing project.
testUsingContext
(
'can re-gen over existing project'
,
()
async
{
...
...
@@ -264,7 +261,7 @@ void main() {
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
projectDir
.
path
]);
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
projectDir
.
path
]);
},
timeout:
createProjectTimeou
t
);
},
timeout:
allowForCreateFlutterProjec
t
);
// Verify that we help the user correct an option ordering issue
testUsingContext
(
'produces sensible error message'
,
()
async
{
...
...
packages/flutter_tools/test/commands/packages_test.dart
View file @
c936aa8c
...
...
@@ -17,8 +17,6 @@ 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'
,
()
{
...
...
@@ -57,7 +55,7 @@ void main() {
final
String
projectPath
=
await
runCommand
(
'get'
);
expectExists
(
projectPath
,
'lib/main.dart'
);
expectExists
(
projectPath
,
'.packages'
);
},
timeout:
remotePubTimeout
);
},
timeout:
allowForRemotePubInvocation
);
testUsingContext
(
'get --offline'
,
()
async
{
final
String
projectPath
=
await
runCommand
(
'get'
,
args:
<
String
>[
'--offline'
]);
...
...
@@ -69,7 +67,7 @@ void main() {
final
String
projectPath
=
await
runCommand
(
'upgrade'
);
expectExists
(
projectPath
,
'lib/main.dart'
);
expectExists
(
projectPath
,
'.packages'
);
},
timeout:
remotePubTimeout
);
},
timeout:
allowForRemotePubInvocation
);
});
group
(
'packages test/pub'
,
()
{
...
...
packages/flutter_tools/test/src/common.dart
View file @
c936aa8c
...
...
@@ -96,4 +96,11 @@ Future<String> createProject(Directory temp) async {
final
CommandRunner
<
Null
>
runner
=
createTestCommandRunner
(
command
);
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
projectPath
]);
return
projectPath
;
}
\ No newline at end of file
}
/// Test case timeout for tests involving remote calls to `pub get` or similar.
const
Timeout
allowForRemotePubInvocation
=
const
Timeout
.
factor
(
10.0
);
/// Test case timeout for tests involving creating a Flutter project with
/// `--no-pub`. Use [allowForRemotePubInvocation] when creation involves `pub`.
const
Timeout
allowForCreateFlutterProject
=
const
Timeout
.
factor
(
2.0
);
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