google / mobly

E2E test framework for tests with complex environment requirements.
https://github.com/google/mobly
Apache License 2.0
639 stars 179 forks source link

ClientBase should call "stop" if "before_starting_server" failed #813

Closed mhaoli closed 2 years ago

mhaoli commented 2 years ago

Part of issue #793. This change is related to the implementation of Windows client.

When implementing the Windows client, we found that we need to improve some behaviors of ClientBase.

Changed content: We modified the ClientBase#initialize function. If error occurs at any stage, this function will abort the initialization process and call stop to clean up.

Reason for the change: Previously we thought that if the ClientBase#before_starting_server stage fails, ClientBase doesn't need to call stop to clean up. But this is wrong, because before_starting_server may also perform some operations that need to be cleaned up.


This change is Reviewable

xpconanfan commented 2 years ago

Please resolve the conflict

mhaoli commented 2 years ago

Resolved.