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
a7db3591
Unverified
Commit
a7db3591
authored
Jul 24, 2020
by
Jonah Williams
Committed by
GitHub
Jul 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] deflake fastReassemble test (#62152)
parent
5e0ba229
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
hot_reload_test.dart
...flutter_tools/test/integration.shard/hot_reload_test.dart
+19
-4
No files found.
packages/flutter_tools/test/integration.shard/hot_reload_test.dart
View file @
a7db3591
...
...
@@ -84,12 +84,25 @@ void main() {
});
test
(
'fastReassemble behavior triggers hot reload behavior with evaluation of expression'
,
()
async
{
final
StringBuffer
stdout
=
StringBuffer
();
final
StreamSubscription
<
String
>
subscription
=
flutter
.
stdout
.
listen
(
stdout
.
writeln
);
final
Completer
<
void
>
tick1
=
Completer
<
void
>();
final
Completer
<
void
>
tick2
=
Completer
<
void
>();
final
Completer
<
void
>
tick3
=
Completer
<
void
>();
final
StreamSubscription
<
String
>
subscription
=
flutter
.
stdout
.
listen
((
String
line
)
{
if
(
line
.
contains
(
'TICK 1'
))
{
tick1
.
complete
();
}
if
(
line
.
contains
(
'TICK 2'
))
{
tick2
.
complete
();
}
if
(
line
.
contains
(
'TICK 3'
))
{
tick3
.
complete
();
}
});
await
flutter
.
run
(
withDebugger:
true
);
final
int
port
=
flutter
.
vmServicePort
;
final
VmService
vmService
=
await
vmServiceConnectUri
(
'ws://localhost:
$port
/ws'
);
await
tick1
.
future
;
try
{
// Since the single-widget reload feature is not yet implemented, manually
// evaluate the expression for the reload.
...
...
@@ -108,7 +121,7 @@ void main() {
// _extensionType indicates success.
expect
(
fastReassemble1
.
type
,
'_extensionType'
);
expect
(
stdout
.
toString
(),
contains
(
'(((TICK 2))))'
))
;
await
tick2
.
future
;
// verify evaluation did not produce invalidat type by checking with dart:core
// type.
...
...
@@ -123,7 +136,9 @@ void main() {
// _extensionType indicates success.
expect
(
fastReassemble2
.
type
,
'_extensionType'
);
expect
(
stdout
.
toString
(),
isNot
(
contains
(
'(((TICK 3))))'
)));
unawaited
(
tick3
.
future
.
whenComplete
(()
{
fail
(
'Should not complete'
);
}));
// Invocation without evaluation leads to runtime error.
expect
(
vmService
...
...
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