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
47b5ed39
Unverified
Commit
47b5ed39
authored
Feb 23, 2022
by
Alexander Dahlberg
Committed by
GitHub
Feb 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed no-shuffle tag and fixed order dependency in daemon_test.dart (#98970)
parent
6a9ac450
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
28 deletions
+31
-28
daemon_test.dart
...utter_tools/test/commands.shard/hermetic/daemon_test.dart
+31
-28
No files found.
packages/flutter_tools/test/commands.shard/hermetic/daemon_test.dart
View file @
47b5ed39
...
...
@@ -4,12 +4,6 @@
// @dart = 2.8
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
// dependencies have been fixed.
// https://github.com/flutter/flutter/issues/85160
// Fails with "flutter test --test-randomize-ordering-seed=1000"
@Tags
(<
String
>[
'no-shuffle'
])
import
'dart:async'
;
import
'dart:io'
as
io
;
import
'dart:typed_data'
;
...
...
@@ -79,12 +73,12 @@ class FakeDaemonStreams implements DaemonStreams {
void
main
(
)
{
Daemon
daemon
;
NotifyingLogger
notifyingLogger
;
BufferLogger
bufferLogger
;
group
(
'daemon'
,
()
{
FakeDaemonStreams
daemonStreams
;
DaemonConnection
daemonConnection
;
setUp
(()
{
BufferLogger
bufferLogger
;
bufferLogger
=
BufferLogger
.
test
();
notifyingLogger
=
NotifyingLogger
(
verbose:
false
,
parent:
bufferLogger
);
daemonStreams
=
FakeDaemonStreams
();
...
...
@@ -677,37 +671,46 @@ void main() {
});
});
testUsingContext
(
'notifyingLogger outputs trace messages in verbose mode'
,
()
async
{
final
NotifyingLogger
logger
=
NotifyingLogger
(
verbose:
true
,
parent:
bufferLogger
);
group
(
'notifyingLogger'
,
()
{
BufferLogger
bufferLogger
;
setUp
(()
{
bufferLogger
=
BufferLogger
.
test
();
});
logger
.
printTrace
(
'test'
);
tearDown
(()
{
bufferLogger
.
clear
();
});
expect
(
bufferLogger
.
errorText
,
contains
(
'test'
));
});
testUsingContext
(
'outputs trace messages in verbose mode'
,
()
async
{
final
NotifyingLogger
logger
=
NotifyingLogger
(
verbose:
true
,
parent:
bufferLogger
);
logger
.
printTrace
(
'test'
);
expect
(
bufferLogger
.
errorText
,
contains
(
'test'
));
});
testUsingContext
(
'notifyingLogger
ignores trace messages in non-verbose mode'
,
()
async
{
final
NotifyingLogger
logger
=
NotifyingLogger
(
verbose:
false
,
parent:
bufferLogger
);
testUsingContext
(
'
ignores trace messages in non-verbose mode'
,
()
async
{
final
NotifyingLogger
logger
=
NotifyingLogger
(
verbose:
false
,
parent:
bufferLogger
);
final
Future
<
LogMessage
>
messageResult
=
logger
.
onMessage
.
first
;
logger
.
printTrace
(
'test'
);
logger
.
printStatus
(
'hello'
);
final
Future
<
LogMessage
>
messageResult
=
logger
.
onMessage
.
first
;
logger
.
printTrace
(
'test'
);
logger
.
printStatus
(
'hello'
);
final
LogMessage
message
=
await
messageResult
;
final
LogMessage
message
=
await
messageResult
;
expect
(
message
.
level
,
'status'
);
expect
(
message
.
message
,
'hello'
);
expect
(
bufferLogger
.
errorText
,
contains
(
'test'
)
);
});
expect
(
message
.
level
,
'status'
);
expect
(
message
.
message
,
'hello'
);
expect
(
bufferLogger
.
errorText
,
isEmpty
);
});
testUsingContext
(
'notifyingLogger
buffers messages sent before a subscription'
,
()
async
{
final
NotifyingLogger
logger
=
NotifyingLogger
(
verbose:
false
,
parent:
bufferLogger
);
testUsingContext
(
'
buffers messages sent before a subscription'
,
()
async
{
final
NotifyingLogger
logger
=
NotifyingLogger
(
verbose:
false
,
parent:
bufferLogger
);
logger
.
printStatus
(
'hello'
);
logger
.
printStatus
(
'hello'
);
final
LogMessage
message
=
await
logger
.
onMessage
.
first
;
final
LogMessage
message
=
await
logger
.
onMessage
.
first
;
expect
(
message
.
level
,
'status'
);
expect
(
message
.
message
,
'hello'
);
expect
(
message
.
level
,
'status'
);
expect
(
message
.
message
,
'hello'
);
});
});
group
(
'daemon queue'
,
()
{
...
...
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