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
35bf5ab5
Unverified
Commit
35bf5ab5
authored
Mar 05, 2020
by
Jonah Williams
Committed by
GitHub
Mar 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter-tools] add awaits to debug a potential timing issue (#52047)
parent
b127868d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
hot_reload_test.dart
...flutter_tools/test/integration.shard/hot_reload_test.dart
+2
-2
No files found.
packages/flutter_tools/test/integration.shard/hot_reload_test.dart
View file @
35bf5ab5
...
...
@@ -125,7 +125,6 @@ void main() {
test
(
"hot reload doesn't reassemble if paused"
,
()
async
{
final
Completer
<
void
>
sawTick1
=
Completer
<
void
>();
final
Completer
<
void
>
sawTick3
=
Completer
<
void
>();
final
Completer
<
void
>
sawDebuggerPausedMessage1
=
Completer
<
void
>();
final
Completer
<
void
>
sawDebuggerPausedMessage2
=
Completer
<
void
>();
final
StreamSubscription
<
String
>
subscription
=
_flutter
.
stdout
.
listen
(
...
...
@@ -146,12 +145,14 @@ void main() {
},
);
await
_flutter
.
run
(
withDebugger:
true
);
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
1
));
await
sawTick1
.
future
;
await
_flutter
.
addBreakpoint
(
_project
.
buildBreakpointUri
,
_project
.
buildBreakpointLine
,
);
bool
reloaded
=
false
;
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
1
));
final
Future
<
void
>
reloadFuture
=
_flutter
.
hotReload
().
then
((
void
value
)
{
reloaded
=
true
;
});
final
Isolate
isolate
=
await
_flutter
.
waitForPause
();
expect
(
isolate
.
pauseEvent
.
kind
,
equals
(
EventKind
.
kPauseBreakpoint
));
...
...
@@ -160,7 +161,6 @@ void main() {
await
reloadFuture
;
// this is the one where it times out because you're in the debugger
expect
(
reloaded
,
isTrue
);
await
_flutter
.
hotReload
();
// now we're already paused
expect
(
sawTick3
.
isCompleted
,
isFalse
);
await
sawDebuggerPausedMessage2
.
future
;
// so we just get told that nothing is going to happen
await
_flutter
.
resume
();
await
subscription
.
cancel
();
...
...
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