Unverified Commit 6dd9e8c1 authored by Chase Latta's avatar Chase Latta Committed by GitHub

[fuchsia] pm serve should not use the device address (#85341)

BUG: fxbug.dev/77566
BUG: https://github.com/flutter/flutter/issues/83609
parent def601ac
......@@ -312,7 +312,7 @@ class FuchsiaDevice extends Device {
}
// Stop the app if it's currently running.
await stopApp(package);
final String host = await hostAddress;
// Find out who the device thinks we are.
final int port = await globals.os.findFreePort();
if (port == 0) {
......@@ -357,7 +357,7 @@ class FuchsiaDevice extends Device {
// Start up a package server.
const String packageServerName = FuchsiaPackageServer.toolHost;
fuchsiaPackageServer = FuchsiaPackageServer(
packageRepo.path, packageServerName, host, port);
packageRepo.path, packageServerName, '', port);
if (!await fuchsiaPackageServer.start()) {
globals.printError('Failed to start the Fuchsia package server');
return LaunchResult.failed();
......
......@@ -229,14 +229,13 @@ void main() {
Artifacts: () => artifacts,
FileSystem: () => memoryFileSystem,
ProcessManager: () => FakeProcessManager.any(),
FuchsiaDeviceTools: () => fuchsiaDeviceTools,
FuchsiaArtifacts: () => FuchsiaArtifacts(sshConfig: null),
OperatingSystemUtils: () => osUtils,
});
testUsingContext('fail when cant get host address', () async {
expect(() async =>
setupAndStartApp(prebuilt: true, mode: BuildMode.release),
FuchsiaDeviceWithFakeDiscovery('123').hostAddress,
throwsToolExit(message: 'Failed to get local address, aborting.'));
}, overrides: <Type, Generator>{
Artifacts: () => artifacts,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment