Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2928def7 authored by David Duarte's avatar David Duarte
Browse files

mmi2grpc: Don't reconnect phone on reset

This is a partial revert of d5a38c8d

We don't want and don't need to reconnect the phone on each reset.
Furthermore this is breaking execution of PTS-bot tests with
the error

```
Error: Traceback (most recent call last):
  File "mmi2grpc/__init__.py", line 73, in __enter__
    RootCanal().reconnect_phone()
  File "mmi2grpc/_rootcanal.py", line 128, in reconnect_phone
    if dev_i not in self._parse_phy(devices["Phys"][phy])[1]:
KeyError: 'Phys'
```

Test: TreeHugger
Change-Id: Icf123f8a77cde4e6bc31a02a9582d3f1f63815ae
parent f3fcc9ea
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ from mmi2grpc.hfp import HFPProxy
from mmi2grpc.hogp import HOGPProxy
from mmi2grpc.sdp import SDPProxy
from mmi2grpc.sm import SMProxy
from mmi2grpc._rootcanal import RootCanal
from mmi2grpc._helpers import format_proxy

from pandora.host_grpc import Host
@@ -70,7 +69,6 @@ class IUT:
        """Resets the IUT when starting a PTS test."""
        # Note: we don't keep a single gRPC channel instance in the IUT class
        # because reset is allowed to close the gRPC server.
        RootCanal().reconnect_phone()
        with grpc.insecure_channel(f'localhost:{self.port}') as channel:
            self._retry(Host(channel).HardReset)(wait_for_ready=True)