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
4adf36a0
Unverified
Commit
4adf36a0
authored
May 14, 2021
by
Jenn Magder
Committed by
GitHub
May 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace testUsingContext with testWithoutContext in protocol_discovery_test (#82499)
parent
08154b22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
67 deletions
+73
-67
protocol_discovery_test.dart
...ter_tools/test/general.shard/protocol_discovery_test.dart
+73
-67
No files found.
packages/flutter_tools/test/general.shard/protocol_discovery_test.dart
View file @
4adf36a0
...
@@ -10,7 +10,6 @@ import 'package:flutter_tools/src/device_port_forwarder.dart';
...
@@ -10,7 +10,6 @@ import 'package:flutter_tools/src/device_port_forwarder.dart';
import
'package:flutter_tools/src/protocol_discovery.dart'
;
import
'package:flutter_tools/src/protocol_discovery.dart'
;
import
'../src/common.dart'
;
import
'../src/common.dart'
;
import
'../src/context.dart'
;
import
'../src/fake_devices.dart'
;
import
'../src/fake_devices.dart'
;
void
main
(
)
{
void
main
(
)
{
...
@@ -18,39 +17,19 @@ void main() {
...
@@ -18,39 +17,19 @@ void main() {
FakeDeviceLogReader
logReader
;
FakeDeviceLogReader
logReader
;
ProtocolDiscovery
discoverer
;
ProtocolDiscovery
discoverer
;
/// Performs test set-up functionality that must be performed as part of
setUp
(()
{
/// the `test()` pass and not part of the `setUp()` pass.
///
/// This exists to make sure we're not creating an error that tries to
/// cross an error-zone boundary. Our use of `testUsingContext()` runs the
/// test code inside an error zone, but the `setUp()` code is not run in
/// any zone. This creates the potential for errors that try to cross
/// error-zone boundaries, which are considered uncaught.
///
/// This also exists for cases where our initialization requires access to
/// a `Context` object, which is only set up inside the zone.
///
/// These issues do not pertain to real code and are a test-only concern,
/// because in real code, the zone is set up in `main()`.
///
/// See also: [runZoned]
void
initialize
({
int
devicePort
,
Duration
throttleDuration
=
const
Duration
(
milliseconds:
200
),
})
{
logReader
=
FakeDeviceLogReader
();
logReader
=
FakeDeviceLogReader
();
discoverer
=
ProtocolDiscovery
.
observatory
(
discoverer
=
ProtocolDiscovery
.
observatory
(
logReader
,
logReader
,
ipv6:
false
,
ipv6:
false
,
hostPort:
null
,
hostPort:
null
,
devicePort:
devicePort
,
devicePort:
null
,
throttleDuration:
throttleDuration
,
throttleDuration:
const
Duration
(
milliseconds:
200
)
,
logger:
BufferLogger
.
test
(),
logger:
BufferLogger
.
test
(),
);
);
}
}
);
testUsingContext
(
'returns non-null uri future'
,
()
async
{
testWithoutContext
(
'returns non-null uri future'
,
()
async
{
initialize
();
expect
(
discoverer
.
uri
,
isNotNull
);
expect
(
discoverer
.
uri
,
isNotNull
);
});
});
...
@@ -60,8 +39,7 @@ void main() {
...
@@ -60,8 +39,7 @@ void main() {
logReader
.
dispose
();
logReader
.
dispose
();
});
});
testUsingContext
(
'discovers uri if logs already produced output'
,
()
async
{
testWithoutContext
(
'discovers uri if logs already produced output'
,
()
async
{
initialize
();
logReader
.
addLine
(
'HELLO WORLD'
);
logReader
.
addLine
(
'HELLO WORLD'
);
logReader
.
addLine
(
'Observatory listening on http://127.0.0.1:9999'
);
logReader
.
addLine
(
'Observatory listening on http://127.0.0.1:9999'
);
final
Uri
uri
=
await
discoverer
.
uri
;
final
Uri
uri
=
await
discoverer
.
uri
;
...
@@ -69,8 +47,7 @@ void main() {
...
@@ -69,8 +47,7 @@ void main() {
expect
(
'
$uri
'
,
'http://127.0.0.1:9999'
);
expect
(
'
$uri
'
,
'http://127.0.0.1:9999'
);
});
});
testUsingContext
(
'discovers uri if logs already produced output and no listener is attached'
,
()
async
{
testWithoutContext
(
'discovers uri if logs already produced output and no listener is attached'
,
()
async
{
initialize
();
logReader
.
addLine
(
'HELLO WORLD'
);
logReader
.
addLine
(
'HELLO WORLD'
);
logReader
.
addLine
(
'Observatory listening on http://127.0.0.1:9999'
);
logReader
.
addLine
(
'Observatory listening on http://127.0.0.1:9999'
);
...
@@ -82,8 +59,7 @@ void main() {
...
@@ -82,8 +59,7 @@ void main() {
expect
(
'
$uri
'
,
'http://127.0.0.1:9999'
);
expect
(
'
$uri
'
,
'http://127.0.0.1:9999'
);
});
});
testUsingContext
(
'uri throws if logs produce bad line and no listener is attached'
,
()
async
{
testWithoutContext
(
'uri throws if logs produce bad line and no listener is attached'
,
()
async
{
initialize
();
logReader
.
addLine
(
'Observatory listening on http://127.0.0.1:apple'
);
logReader
.
addLine
(
'Observatory listening on http://127.0.0.1:apple'
);
await
Future
<
void
>.
delayed
(
Duration
.
zero
);
await
Future
<
void
>.
delayed
(
Duration
.
zero
);
...
@@ -91,8 +67,7 @@ void main() {
...
@@ -91,8 +67,7 @@ void main() {
expect
(
discoverer
.
uri
,
throwsA
(
isFormatException
));
expect
(
discoverer
.
uri
,
throwsA
(
isFormatException
));
});
});
testUsingContext
(
'discovers uri if logs not yet produced output'
,
()
async
{
testWithoutContext
(
'discovers uri if logs not yet produced output'
,
()
async
{
initialize
();
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
logReader
.
addLine
(
'Observatory listening on http://127.0.0.1:3333'
);
logReader
.
addLine
(
'Observatory listening on http://127.0.0.1:3333'
);
final
Uri
uri
=
await
uriFuture
;
final
Uri
uri
=
await
uriFuture
;
...
@@ -100,30 +75,26 @@ void main() {
...
@@ -100,30 +75,26 @@ void main() {
expect
(
'
$uri
'
,
'http://127.0.0.1:3333'
);
expect
(
'
$uri
'
,
'http://127.0.0.1:3333'
);
});
});
testUsingContext
(
'discovers uri with Ascii Esc code'
,
()
async
{
testWithoutContext
(
'discovers uri with Ascii Esc code'
,
()
async
{
initialize
();
logReader
.
addLine
(
'Observatory listening on http://127.0.0.1:3333
\
x1b['
);
logReader
.
addLine
(
'Observatory listening on http://127.0.0.1:3333
\
x1b['
);
final
Uri
uri
=
await
discoverer
.
uri
;
final
Uri
uri
=
await
discoverer
.
uri
;
expect
(
uri
.
port
,
3333
);
expect
(
uri
.
port
,
3333
);
expect
(
'
$uri
'
,
'http://127.0.0.1:3333'
);
expect
(
'
$uri
'
,
'http://127.0.0.1:3333'
);
});
});
testUsingContext
(
'uri throws if logs produce bad line'
,
()
async
{
testWithoutContext
(
'uri throws if logs produce bad line'
,
()
async
{
initialize
();
logReader
.
addLine
(
'Observatory listening on http://127.0.0.1:apple'
);
logReader
.
addLine
(
'Observatory listening on http://127.0.0.1:apple'
);
expect
(
discoverer
.
uri
,
throwsA
(
isFormatException
));
expect
(
discoverer
.
uri
,
throwsA
(
isFormatException
));
});
});
testUsingContext
(
'uri is null when the log reader closes early'
,
()
async
{
testWithoutContext
(
'uri is null when the log reader closes early'
,
()
async
{
initialize
();
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
await
logReader
.
dispose
();
await
logReader
.
dispose
();
expect
(
await
uriFuture
,
isNull
);
expect
(
await
uriFuture
,
isNull
);
});
});
testUsingContext
(
'uri waits for correct log line'
,
()
async
{
testWithoutContext
(
'uri waits for correct log line'
,
()
async
{
initialize
();
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
logReader
.
addLine
(
'Observatory not listening...'
);
logReader
.
addLine
(
'Observatory not listening...'
);
final
Uri
timeoutUri
=
Uri
.
parse
(
'http://timeout'
);
final
Uri
timeoutUri
=
Uri
.
parse
(
'http://timeout'
);
...
@@ -134,16 +105,14 @@ void main() {
...
@@ -134,16 +105,14 @@ void main() {
expect
(
actualUri
,
timeoutUri
);
expect
(
actualUri
,
timeoutUri
);
});
});
testUsingContext
(
'discovers uri if log line contains Android prefix'
,
()
async
{
testWithoutContext
(
'discovers uri if log line contains Android prefix'
,
()
async
{
initialize
();
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:52584'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:52584'
);
final
Uri
uri
=
await
discoverer
.
uri
;
final
Uri
uri
=
await
discoverer
.
uri
;
expect
(
uri
.
port
,
52584
);
expect
(
uri
.
port
,
52584
);
expect
(
'
$uri
'
,
'http://127.0.0.1:52584'
);
expect
(
'
$uri
'
,
'http://127.0.0.1:52584'
);
});
});
testUsingContext
(
'discovers uri if log line contains auth key'
,
()
async
{
testWithoutContext
(
'discovers uri if log line contains auth key'
,
()
async
{
initialize
();
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/'
);
final
Uri
uri
=
await
uriFuture
;
final
Uri
uri
=
await
uriFuture
;
...
@@ -151,8 +120,7 @@ void main() {
...
@@ -151,8 +120,7 @@ void main() {
expect
(
'
$uri
'
,
'http://127.0.0.1:54804/PTwjm8Ii8qg=/'
);
expect
(
'
$uri
'
,
'http://127.0.0.1:54804/PTwjm8Ii8qg=/'
);
});
});
testUsingContext
(
'discovers uri if log line contains non-localhost'
,
()
async
{
testWithoutContext
(
'discovers uri if log line contains non-localhost'
,
()
async
{
initialize
();
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/'
);
final
Uri
uri
=
await
uriFuture
;
final
Uri
uri
=
await
uriFuture
;
...
@@ -160,8 +128,15 @@ void main() {
...
@@ -160,8 +128,15 @@ void main() {
expect
(
'
$uri
'
,
'http://127.0.0.1:54804/PTwjm8Ii8qg=/'
);
expect
(
'
$uri
'
,
'http://127.0.0.1:54804/PTwjm8Ii8qg=/'
);
});
});
testUsingContext
(
'skips uri if port does not match the requested vmservice - requested last'
,
()
async
{
testWithoutContext
(
'skips uri if port does not match the requested vmservice - requested last'
,
()
async
{
initialize
(
devicePort:
12346
);
discoverer
=
ProtocolDiscovery
.
observatory
(
logReader
,
ipv6:
false
,
hostPort:
null
,
devicePort:
12346
,
throttleDuration:
const
Duration
(
milliseconds:
200
),
logger:
BufferLogger
.
test
(),
);
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
...
@@ -170,8 +145,15 @@ void main() {
...
@@ -170,8 +145,15 @@ void main() {
expect
(
'
$uri
'
,
'http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
expect
(
'
$uri
'
,
'http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
});
});
testUsingContext
(
'skips uri if port does not match the requested vmservice - requested first'
,
()
async
{
testWithoutContext
(
'skips uri if port does not match the requested vmservice - requested first'
,
()
async
{
initialize
(
devicePort:
12346
);
discoverer
=
ProtocolDiscovery
.
observatory
(
logReader
,
ipv6:
false
,
hostPort:
null
,
devicePort:
12346
,
throttleDuration:
const
Duration
(
milliseconds:
200
),
logger:
BufferLogger
.
test
(),
);
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
final
Future
<
Uri
>
uriFuture
=
discoverer
.
uri
;
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/'
);
...
@@ -180,8 +162,7 @@ void main() {
...
@@ -180,8 +162,7 @@ void main() {
expect
(
'
$uri
'
,
'http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
expect
(
'
$uri
'
,
'http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
});
});
testUsingContext
(
'first uri in the stream is the last one from the log'
,
()
async
{
testWithoutContext
(
'first uri in the stream is the last one from the log'
,
()
async
{
initialize
();
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/'
);
final
Uri
uri
=
await
discoverer
.
uris
.
first
;
final
Uri
uri
=
await
discoverer
.
uris
.
first
;
...
@@ -189,8 +170,15 @@ void main() {
...
@@ -189,8 +170,15 @@ void main() {
expect
(
'
$uri
'
,
'http://127.0.0.1:12345/PTwjm8Ii8qg=/'
);
expect
(
'
$uri
'
,
'http://127.0.0.1:12345/PTwjm8Ii8qg=/'
);
});
});
testUsingContext
(
'first uri in the stream is the last one from the log that matches the port'
,
()
async
{
testWithoutContext
(
'first uri in the stream is the last one from the log that matches the port'
,
()
async
{
initialize
(
devicePort:
12345
);
discoverer
=
ProtocolDiscovery
.
observatory
(
logReader
,
ipv6:
false
,
hostPort:
null
,
devicePort:
12345
,
throttleDuration:
const
Duration
(
milliseconds:
200
),
logger:
BufferLogger
.
test
(),
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12344/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12344/PTwjm8Ii8qg=/'
);
...
@@ -199,8 +187,15 @@ void main() {
...
@@ -199,8 +187,15 @@ void main() {
expect
(
'
$uri
'
,
'http://127.0.0.1:12345/PTwjm8Ii8qg=/'
);
expect
(
'
$uri
'
,
'http://127.0.0.1:12345/PTwjm8Ii8qg=/'
);
});
});
testUsingContext
(
'protocol discovery does not crash if the log reader is closed while delaying'
,
()
async
{
testWithoutContext
(
'protocol discovery does not crash if the log reader is closed while delaying'
,
()
async
{
initialize
(
devicePort:
12346
,
throttleDuration:
const
Duration
(
milliseconds:
10
));
discoverer
=
ProtocolDiscovery
.
observatory
(
logReader
,
ipv6:
false
,
hostPort:
null
,
devicePort:
12346
,
throttleDuration:
const
Duration
(
milliseconds:
10
),
logger:
BufferLogger
.
test
(),
);
final
Future
<
List
<
Uri
>>
results
=
discoverer
.
uris
.
toList
();
final
Future
<
List
<
Uri
>>
results
=
discoverer
.
uris
.
toList
();
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
logReader
.
addLine
(
'I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/'
);
...
@@ -211,11 +206,18 @@ void main() {
...
@@ -211,11 +206,18 @@ void main() {
expect
(
await
results
,
isEmpty
);
expect
(
await
results
,
isEmpty
);
});
});
test
Using
Context
(
'uris in the stream are throttled'
,
()
async
{
test
Without
Context
(
'uris in the stream are throttled'
,
()
async
{
const
Duration
kThrottleDuration
=
Duration
(
milliseconds:
10
);
const
Duration
kThrottleDuration
=
Duration
(
milliseconds:
10
);
FakeAsync
().
run
((
FakeAsync
time
)
{
FakeAsync
().
run
((
FakeAsync
time
)
{
initialize
(
throttleDuration:
kThrottleDuration
);
discoverer
=
ProtocolDiscovery
.
observatory
(
logReader
,
ipv6:
false
,
hostPort:
null
,
devicePort:
null
,
throttleDuration:
kThrottleDuration
,
logger:
BufferLogger
.
test
(),
);
final
List
<
Uri
>
discoveredUris
=
<
Uri
>[];
final
List
<
Uri
>
discoveredUris
=
<
Uri
>[];
discoverer
.
uris
.
listen
((
Uri
uri
)
{
discoverer
.
uris
.
listen
((
Uri
uri
)
{
...
@@ -240,13 +242,17 @@ void main() {
...
@@ -240,13 +242,17 @@ void main() {
});
});
});
});
test
Using
Context
(
'uris in the stream are throttled when they match the port'
,
()
async
{
test
Without
Context
(
'uris in the stream are throttled when they match the port'
,
()
async
{
const
Duration
kThrottleTimeInMilliseconds
=
Duration
(
milliseconds:
10
);
const
Duration
kThrottleTimeInMilliseconds
=
Duration
(
milliseconds:
10
);
FakeAsync
().
run
((
FakeAsync
time
)
{
FakeAsync
().
run
((
FakeAsync
time
)
{
initialize
(
discoverer
=
ProtocolDiscovery
.
observatory
(
logReader
,
ipv6:
false
,
hostPort:
null
,
devicePort:
12345
,
devicePort:
12345
,
throttleDuration:
kThrottleTimeInMilliseconds
,
throttleDuration:
kThrottleTimeInMilliseconds
,
logger:
BufferLogger
.
test
(),
);
);
final
List
<
Uri
>
discoveredUris
=
<
Uri
>[];
final
List
<
Uri
>
discoveredUris
=
<
Uri
>[];
...
@@ -274,7 +280,7 @@ void main() {
...
@@ -274,7 +280,7 @@ void main() {
});
});
group
(
'port forwarding'
,
()
{
group
(
'port forwarding'
,
()
{
test
Using
Context
(
'default port'
,
()
async
{
test
Without
Context
(
'default port'
,
()
async
{
final
FakeDeviceLogReader
logReader
=
FakeDeviceLogReader
();
final
FakeDeviceLogReader
logReader
=
FakeDeviceLogReader
();
final
ProtocolDiscovery
discoverer
=
ProtocolDiscovery
.
observatory
(
final
ProtocolDiscovery
discoverer
=
ProtocolDiscovery
.
observatory
(
logReader
,
logReader
,
...
@@ -296,7 +302,7 @@ void main() {
...
@@ -296,7 +302,7 @@ void main() {
await
logReader
.
dispose
();
await
logReader
.
dispose
();
});
});
test
Using
Context
(
'specified port'
,
()
async
{
test
Without
Context
(
'specified port'
,
()
async
{
final
FakeDeviceLogReader
logReader
=
FakeDeviceLogReader
();
final
FakeDeviceLogReader
logReader
=
FakeDeviceLogReader
();
final
ProtocolDiscovery
discoverer
=
ProtocolDiscovery
.
observatory
(
final
ProtocolDiscovery
discoverer
=
ProtocolDiscovery
.
observatory
(
logReader
,
logReader
,
...
@@ -318,7 +324,7 @@ void main() {
...
@@ -318,7 +324,7 @@ void main() {
await
logReader
.
dispose
();
await
logReader
.
dispose
();
});
});
test
Using
Context
(
'specified port zero'
,
()
async
{
test
Without
Context
(
'specified port zero'
,
()
async
{
final
FakeDeviceLogReader
logReader
=
FakeDeviceLogReader
();
final
FakeDeviceLogReader
logReader
=
FakeDeviceLogReader
();
final
ProtocolDiscovery
discoverer
=
ProtocolDiscovery
.
observatory
(
final
ProtocolDiscovery
discoverer
=
ProtocolDiscovery
.
observatory
(
logReader
,
logReader
,
...
@@ -340,7 +346,7 @@ void main() {
...
@@ -340,7 +346,7 @@ void main() {
await
logReader
.
dispose
();
await
logReader
.
dispose
();
});
});
test
Using
Context
(
'ipv6'
,
()
async
{
test
Without
Context
(
'ipv6'
,
()
async
{
final
FakeDeviceLogReader
logReader
=
FakeDeviceLogReader
();
final
FakeDeviceLogReader
logReader
=
FakeDeviceLogReader
();
final
ProtocolDiscovery
discoverer
=
ProtocolDiscovery
.
observatory
(
final
ProtocolDiscovery
discoverer
=
ProtocolDiscovery
.
observatory
(
logReader
,
logReader
,
...
@@ -362,7 +368,7 @@ void main() {
...
@@ -362,7 +368,7 @@ void main() {
await
logReader
.
dispose
();
await
logReader
.
dispose
();
});
});
test
Using
Context
(
'ipv6 with Ascii Escape code'
,
()
async
{
test
Without
Context
(
'ipv6 with Ascii Escape code'
,
()
async
{
final
FakeDeviceLogReader
logReader
=
FakeDeviceLogReader
();
final
FakeDeviceLogReader
logReader
=
FakeDeviceLogReader
();
final
ProtocolDiscovery
discoverer
=
ProtocolDiscovery
.
observatory
(
final
ProtocolDiscovery
discoverer
=
ProtocolDiscovery
.
observatory
(
logReader
,
logReader
,
...
...
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