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
57ca2b5c
Commit
57ca2b5c
authored
Apr 06, 2017
by
Yegor
Committed by
GitHub
Apr 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
obey custom timeout supplied by cocoon (#9260)
parent
c96ab53b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
framework.dart
dev/devicelab/lib/framework/framework.dart
+6
-3
manifest.yaml
dev/devicelab/manifest.yaml
+2
-0
No files found.
dev/devicelab/lib/framework/framework.dart
View file @
57ca2b5c
...
...
@@ -16,7 +16,7 @@ import 'utils.dart';
/// Maximum amount of time a single task is allowed to take to run.
///
/// If exceeded the task is considered to have failed.
const
Duration
taskTimeout
=
const
Duration
(
minutes:
2
5
);
const
Duration
_kDefaultTaskTimeout
=
const
Duration
(
minutes:
1
5
);
/// Represents a unit of work performed in the CI environment that can
/// succeed, fail and be retried independently of others.
...
...
@@ -63,7 +63,10 @@ class _TaskRunner {
_TaskRunner
(
this
.
task
)
{
registerExtension
(
'ext.cocoonRunTask'
,
(
String
method
,
Map
<
String
,
String
>
parameters
)
async
{
final
TaskResult
result
=
await
run
();
final
Duration
taskTimeout
=
parameters
.
containsKey
(
'timeoutInMinutes'
)
?
new
Duration
(
minutes:
int
.
parse
(
parameters
[
'timeoutInMinutes'
]))
:
_kDefaultTaskTimeout
;
final
TaskResult
result
=
await
run
(
taskTimeout
);
return
new
ServiceExtensionResponse
.
result
(
JSON
.
encode
(
result
.
toJson
()));
});
registerExtension
(
'ext.cocoonRunnerReady'
,
...
...
@@ -75,7 +78,7 @@ class _TaskRunner {
/// Signals that this task runner finished running the task.
Future
<
TaskResult
>
get
whenDone
=>
_completer
.
future
;
Future
<
TaskResult
>
run
()
async
{
Future
<
TaskResult
>
run
(
Duration
taskTimeout
)
async
{
try
{
_taskStarted
=
true
;
final
TaskResult
result
=
await
_performTask
().
timeout
(
taskTimeout
);
...
...
dev/devicelab/manifest.yaml
View file @
57ca2b5c
...
...
@@ -143,6 +143,7 @@ tasks:
Runs benchmarks from dev/benchmarks/microbenchmarks.
stage
:
devicelab
required_agent_capabilities
:
[
"
has-android-device"
]
timeout_in_minutes
:
30
flutter_view__start_up
:
description
:
>
...
...
@@ -195,6 +196,7 @@ tasks:
Runs benchmarks from dev/benchmarks/microbenchmarks on iOS.
stage
:
devicelab_ios
required_agent_capabilities
:
[
"
has-ios-device"
]
timeout_in_minutes
:
30
flutter_view_ios__start_up
:
description
:
>
...
...
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