go-ios icon indicating copy to clipboard operation
go-ios copied to clipboard

Fix shutdown error in TestXcuiTest() added in recent commit with new …

Open briankrznarich opened this issue 2 years ago • 0 comments

…context support

The new semantics of testmanagerd.RunXCUIWithBundleIdsCtx() are that if a context is passed, the context is supposed to have an associated cancel() method, which should be called to abort the method.

Passing a context does not interact well with testmanagerd.CloseXCUITestRunner(). It appears that you should use one (the context) or the other (testmanagerd.CloseXCUITestRunner), not both.

It's arguable that this warrants a separate test, one for each invocation technique.

As it stands, I haven't run the test since I don't have wda available to install, but I can confirm this is an issue in the invocation made from main.go "runwda".

briankrznarich avatar Aug 10 '22 10:08 briankrznarich