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

Commit c182ad6b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Cert: make sure we unregister controllers during teardown" am: a41d5c6c am: 106c3b4a

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1838394

Change-Id: I50c91c6e62533cc3b44c0f72de4489accdbfda81
parents e95e94c2 106c3b4a
Loading
Loading
Loading
Loading
+13 −12
Original line number Diff line number Diff line
@@ -126,14 +126,15 @@ class GdBaseTestClass(base_test.BaseTestClass):
        self.cert.wait_channel_ready()

    def teardown_test(self):
        stack = ""
        try:
            stack = "CERT"
            self.cert.rootservice.StopStack(facade_rootservice.StopStackRequest())
        except RpcError as rpc_error:
            asserts.fail("Failed to stop CERT stack, RpcError={!r}".format(rpc_error))
        try:
            stack = "DUT"
            self.dut.rootservice.StopStack(facade_rootservice.StopStackRequest())
        except RpcError as rpc_error:
            asserts.fail("Failed to stop DUT stack, RpcError={!r}".format(rpc_error))
            asserts.fail("Failed to stop {} stack, RpcError={!r}".format(stack, rpc_error))
        finally:
            # Destroy GD device objects
            self._controller_manager.unregister_controllers()
            teardown_rootcanal(
+12 −11
Original line number Diff line number Diff line
@@ -132,14 +132,15 @@ class GdBaseTestClass(BaseTestClass):
        self.cert.wait_channel_ready()

    def teardown_test(self):
        stack = ""
        try:
            stack = "CERT"
            self.cert.rootservice.StopStack(facade_rootservice.StopStackRequest())
        except RpcError as rpc_error:
            asserts.fail("Failed to stop CERT stack, RpcError={!r}".format(rpc_error))
        try:
            stack = "DUT"
            self.dut.rootservice.StopStack(facade_rootservice.StopStackRequest())
        except RpcError as rpc_error:
            asserts.fail("Failed to stop DUT stack, RpcError={!r}".format(rpc_error))
            asserts.fail("Failed to stop {} stack, RpcError={!r}".format(stack, rpc_error))
        finally:
            # Destroy GD device objects
            self._controller_manager.unregister_controllers()
            teardown_rootcanal(