Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Make sure the test is never going to be unexpectedly interrupted #664

Merged
merged 5 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions WebDriverAgent.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
641EE5F52240C5CA00173FCB /* XCUIElement+FBUID.m in Sources */ = {isa = PBXBuildFile; fileRef = 71B49EC61ED1A58100D51AD6 /* XCUIElement+FBUID.m */; };
641EE5F62240C5CA00173FCB /* FBRouteRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = EE9AB7881CAEDF0C008C271F /* FBRouteRequest.m */; };
641EE5F72240C5CA00173FCB /* FBResponseJSONPayload.m in Sources */ = {isa = PBXBuildFile; fileRef = EE9AB7811CAEDF0C008C271F /* FBResponseJSONPayload.m */; };
641EE5F82240C5CA00173FCB /* FBXCTestCaseImplementationFailureHoldingProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = EE7E271B1D06C69F001BEC7B /* FBXCTestCaseImplementationFailureHoldingProxy.m */; };
641EE5F92240C5CA00173FCB /* FBMjpegServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7155D702211DCEF400166C20 /* FBMjpegServer.m */; };
641EE5FA2240C5CA00173FCB /* XCUIDevice+FBHealthCheck.m in Sources */ = {isa = PBXBuildFile; fileRef = EEDFE1201D9C06F800E6FFE5 /* XCUIDevice+FBHealthCheck.m */; };
641EE5FD2240C5CA00173FCB /* FBBaseActionsSynthesizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7140974D1FAE20EE008FB2C5 /* FBBaseActionsSynthesizer.m */; };
Expand Down Expand Up @@ -275,7 +274,6 @@
641EE6D72240C5CA00173FCB /* XCTestObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = EE35ACE21E3B77D600A02D78 /* XCTestObserver.h */; settings = {ATTRIBUTES = (Public, ); }; };
641EE6D82240C5CA00173FCB /* XCUIElement.h in Headers */ = {isa = PBXBuildFile; fileRef = EE35ACFE1E3B77D600A02D78 /* XCUIElement.h */; settings = {ATTRIBUTES = (Public, ); }; };
641EE6D92240C5CA00173FCB /* XCKeyboardInputSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = EE35ACBE1E3B77D600A02D78 /* XCKeyboardInputSolver.h */; settings = {ATTRIBUTES = (Public, ); }; };
641EE6DA2240C5CA00173FCB /* FBXCTestCaseImplementationFailureHoldingProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = EE7E271A1D06C69F001BEC7B /* FBXCTestCaseImplementationFailureHoldingProxy.h */; };
641EE6DB2240C5CA00173FCB /* FBPasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 71930C4020662E1F00D3AFEC /* FBPasteboard.h */; };
641EE6DC2240C5CA00173FCB /* FBAppiumActionsSynthesizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 714097451FAE1B32008FB2C5 /* FBAppiumActionsSynthesizer.h */; };
641EE6DD2240C5CA00173FCB /* FBDebugLogDelegateDecorator.h in Headers */ = {isa = PBXBuildFile; fileRef = EE7E27181D06C69F001BEC7B /* FBDebugLogDelegateDecorator.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -449,6 +447,10 @@
71A224E51DE2F56600844D55 /* NSPredicate+FBFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A224E31DE2F56600844D55 /* NSPredicate+FBFormat.h */; };
71A224E61DE2F56600844D55 /* NSPredicate+FBFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 71A224E41DE2F56600844D55 /* NSPredicate+FBFormat.m */; };
71A224E81DE326C500844D55 /* NSPredicateFBFormatTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 71A224E71DE326C500844D55 /* NSPredicateFBFormatTests.m */; };
71A5C67329A4F39600421C37 /* XCTIssue+FBPatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A5C67129A4F39600421C37 /* XCTIssue+FBPatcher.h */; settings = {ATTRIBUTES = (Public, ); }; };
71A5C67429A4F39600421C37 /* XCTIssue+FBPatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A5C67129A4F39600421C37 /* XCTIssue+FBPatcher.h */; settings = {ATTRIBUTES = (Public, ); }; };
71A5C67529A4F39600421C37 /* XCTIssue+FBPatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 71A5C67229A4F39600421C37 /* XCTIssue+FBPatcher.m */; };
71A5C67629A4F39600421C37 /* XCTIssue+FBPatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 71A5C67229A4F39600421C37 /* XCTIssue+FBPatcher.m */; };
71A7EAF51E20516B001DA4F2 /* XCUIElement+FBClassChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A7EAF31E20516B001DA4F2 /* XCUIElement+FBClassChain.h */; };
71A7EAF61E20516B001DA4F2 /* XCUIElement+FBClassChain.m in Sources */ = {isa = PBXBuildFile; fileRef = 71A7EAF41E20516B001DA4F2 /* XCUIElement+FBClassChain.m */; };
71A7EAF91E224648001DA4F2 /* FBClassChainQueryParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 71A7EAF71E224648001DA4F2 /* FBClassChainQueryParser.h */; };
Expand Down Expand Up @@ -765,8 +767,6 @@
EE6B64FE1D0F86EF00E85F5D /* XCTestPrivateSymbols.m in Sources */ = {isa = PBXBuildFile; fileRef = EE6B64FC1D0F86EF00E85F5D /* XCTestPrivateSymbols.m */; };
EE7E271C1D06C69F001BEC7B /* FBDebugLogDelegateDecorator.h in Headers */ = {isa = PBXBuildFile; fileRef = EE7E27181D06C69F001BEC7B /* FBDebugLogDelegateDecorator.h */; settings = {ATTRIBUTES = (Public, ); }; };
EE7E271D1D06C69F001BEC7B /* FBDebugLogDelegateDecorator.m in Sources */ = {isa = PBXBuildFile; fileRef = EE7E27191D06C69F001BEC7B /* FBDebugLogDelegateDecorator.m */; };
EE7E271E1D06C69F001BEC7B /* FBXCTestCaseImplementationFailureHoldingProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = EE7E271A1D06C69F001BEC7B /* FBXCTestCaseImplementationFailureHoldingProxy.h */; };
EE7E271F1D06C69F001BEC7B /* FBXCTestCaseImplementationFailureHoldingProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = EE7E271B1D06C69F001BEC7B /* FBXCTestCaseImplementationFailureHoldingProxy.m */; };
EE8BA97A1DCCED9A00A9DEF8 /* FBNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = EE8BA9791DCCED9A00A9DEF8 /* FBNavigationController.m */; };
EE8DDD7E20C5733C004D4925 /* XCUIElement+FBForceTouch.m in Sources */ = {isa = PBXBuildFile; fileRef = EE8DDD7C20C5733B004D4925 /* XCUIElement+FBForceTouch.m */; };
EE8DDD7F20C5733C004D4925 /* XCUIElement+FBForceTouch.h in Headers */ = {isa = PBXBuildFile; fileRef = EE8DDD7D20C5733C004D4925 /* XCUIElement+FBForceTouch.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -1036,6 +1036,8 @@
71A224E31DE2F56600844D55 /* NSPredicate+FBFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSPredicate+FBFormat.h"; path = "../Utilities/NSPredicate+FBFormat.h"; sourceTree = "<group>"; };
71A224E41DE2F56600844D55 /* NSPredicate+FBFormat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSPredicate+FBFormat.m"; path = "../Utilities/NSPredicate+FBFormat.m"; sourceTree = "<group>"; };
71A224E71DE326C500844D55 /* NSPredicateFBFormatTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSPredicateFBFormatTests.m; sourceTree = "<group>"; };
71A5C67129A4F39600421C37 /* XCTIssue+FBPatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "XCTIssue+FBPatcher.h"; sourceTree = "<group>"; };
71A5C67229A4F39600421C37 /* XCTIssue+FBPatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "XCTIssue+FBPatcher.m"; sourceTree = "<group>"; };
71A7EAF31E20516B001DA4F2 /* XCUIElement+FBClassChain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "XCUIElement+FBClassChain.h"; sourceTree = "<group>"; };
71A7EAF41E20516B001DA4F2 /* XCUIElement+FBClassChain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "XCUIElement+FBClassChain.m"; sourceTree = "<group>"; };
71A7EAF71E224648001DA4F2 /* FBClassChainQueryParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBClassChainQueryParser.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1265,8 +1267,6 @@
EE6B64FC1D0F86EF00E85F5D /* XCTestPrivateSymbols.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCTestPrivateSymbols.m; sourceTree = "<group>"; };
EE7E27181D06C69F001BEC7B /* FBDebugLogDelegateDecorator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBDebugLogDelegateDecorator.h; sourceTree = "<group>"; };
EE7E27191D06C69F001BEC7B /* FBDebugLogDelegateDecorator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBDebugLogDelegateDecorator.m; sourceTree = "<group>"; };
EE7E271A1D06C69F001BEC7B /* FBXCTestCaseImplementationFailureHoldingProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBXCTestCaseImplementationFailureHoldingProxy.h; sourceTree = "<group>"; };
EE7E271B1D06C69F001BEC7B /* FBXCTestCaseImplementationFailureHoldingProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBXCTestCaseImplementationFailureHoldingProxy.m; sourceTree = "<group>"; };
EE836C021C0F118600D87246 /* UnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
EE8BA9781DCCED9A00A9DEF8 /* FBNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBNavigationController.h; sourceTree = "<group>"; };
EE8BA9791DCCED9A00A9DEF8 /* FBNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBNavigationController.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1727,6 +1727,8 @@
716E0BCD1E917E810087A825 /* NSString+FBXMLSafeString.m */,
714E14B629805CAE00375DD7 /* XCAXClient_iOS+FBSnapshotReqParams.h */,
714E14B729805CAE00375DD7 /* XCAXClient_iOS+FBSnapshotReqParams.m */,
71A5C67129A4F39600421C37 /* XCTIssue+FBPatcher.h */,
71A5C67229A4F39600421C37 /* XCTIssue+FBPatcher.m */,
AD6C269A1CF2494200F8B5FF /* XCUIApplication+FBHelpers.h */,
AD6C269B1CF2494200F8B5FF /* XCUIApplication+FBHelpers.m */,
71C8E54F25399A6B008572C1 /* XCUIApplication+FBQuiescence.h */,
Expand Down Expand Up @@ -1940,8 +1942,6 @@
7157B290221DADD2001C348C /* FBXCAXClientProxy.m */,
EE5A24401F136C8D0078B1D9 /* FBXCodeCompatibility.h */,
EE5A24411F136C8D0078B1D9 /* FBXCodeCompatibility.m */,
EE7E271A1D06C69F001BEC7B /* FBXCTestCaseImplementationFailureHoldingProxy.h */,
EE7E271B1D06C69F001BEC7B /* FBXCTestCaseImplementationFailureHoldingProxy.m */,
EE35AD791E3B80C000A02D78 /* FBXCTestDaemonsProxy.h */,
EE35AD7A1E3B80C000A02D78 /* FBXCTestDaemonsProxy.m */,
714D88CA2733FB970074A925 /* FBXMLGenerationOptions.h */,
Expand Down Expand Up @@ -2349,6 +2349,7 @@
641EE67B2240C5CA00173FCB /* XCUIRecorderUtilities.h in Headers */,
6496A5DA230D6EB30087F8CB /* AXSettings.h in Headers */,
641EE67C2240C5CA00173FCB /* XCTestCaseRun.h in Headers */,
71A5C67429A4F39600421C37 /* XCTIssue+FBPatcher.h in Headers */,
641EE67D2240C5CA00173FCB /* XCTestConfiguration.h in Headers */,
641EE67E2240C5CA00173FCB /* _XCTDarwinNotificationExpectationImplementation.h in Headers */,
641EE67F2240C5CA00173FCB /* XCTestExpectation.h in Headers */,
Expand Down Expand Up @@ -2456,7 +2457,6 @@
641EE6D72240C5CA00173FCB /* XCTestObserver.h in Headers */,
641EE6D82240C5CA00173FCB /* XCUIElement.h in Headers */,
641EE6D92240C5CA00173FCB /* XCKeyboardInputSolver.h in Headers */,
641EE6DA2240C5CA00173FCB /* FBXCTestCaseImplementationFailureHoldingProxy.h in Headers */,
718226CB2587443700661B83 /* GCDAsyncUdpSocket.h in Headers */,
641EE6DB2240C5CA00173FCB /* FBPasteboard.h in Headers */,
711CD03525ED1106001C01D2 /* XCUIScreenDataSource-Protocol.h in Headers */,
Expand Down Expand Up @@ -2619,6 +2619,7 @@
E444DC83249131B10060D7EB /* DDNumber.h in Headers */,
EE35AD271E3B77D600A02D78 /* XCApplicationMonitor.h in Headers */,
EE8DDD7F20C5733C004D4925 /* XCUIElement+FBForceTouch.h in Headers */,
71A5C67329A4F39600421C37 /* XCTIssue+FBPatcher.h in Headers */,
EE158AEA1CBD456F00A3E3F0 /* FBRuntimeUtils.h in Headers */,
7136A4791E8918E60024FC3D /* XCUIElement+FBPickerWheel.h in Headers */,
E444DCB324913C220060D7EB /* RoutingHTTPServer.h in Headers */,
Expand Down Expand Up @@ -2696,7 +2697,6 @@
EE35AD531E3B77D600A02D78 /* XCTestObserver.h in Headers */,
EE35AD6F1E3B77D600A02D78 /* XCUIElement.h in Headers */,
EE35AD2F1E3B77D600A02D78 /* XCKeyboardInputSolver.h in Headers */,
EE7E271E1D06C69F001BEC7B /* FBXCTestCaseImplementationFailureHoldingProxy.h in Headers */,
71930C4220662E1F00D3AFEC /* FBPasteboard.h in Headers */,
714097471FAE1B32008FB2C5 /* FBAppiumActionsSynthesizer.h in Headers */,
EE7E271C1D06C69F001BEC7B /* FBDebugLogDelegateDecorator.h in Headers */,
Expand Down Expand Up @@ -3124,7 +3124,6 @@
641EE5F62240C5CA00173FCB /* FBRouteRequest.m in Sources */,
641EE5F72240C5CA00173FCB /* FBResponseJSONPayload.m in Sources */,
718226D12587443700661B83 /* GCDAsyncUdpSocket.m in Sources */,
641EE5F82240C5CA00173FCB /* FBXCTestCaseImplementationFailureHoldingProxy.m in Sources */,
641EE5F92240C5CA00173FCB /* FBMjpegServer.m in Sources */,
641EE5FA2240C5CA00173FCB /* XCUIDevice+FBHealthCheck.m in Sources */,
641EE5FD2240C5CA00173FCB /* FBBaseActionsSynthesizer.m in Sources */,
Expand Down Expand Up @@ -3154,6 +3153,7 @@
641EE6102240C5CA00173FCB /* FBImageUtils.m in Sources */,
641EE6112240C5CA00173FCB /* FBSession.m in Sources */,
641EE6122240C5CA00173FCB /* FBFindElementCommands.m in Sources */,
71A5C67629A4F39600421C37 /* XCTIssue+FBPatcher.m in Sources */,
641EE6132240C5CA00173FCB /* FBDebugLogDelegateDecorator.m in Sources */,
641EE6142240C5CA00173FCB /* FBAlertViewCommands.m in Sources */,
71414EDB2670A1EE003A8C5D /* LRUCacheNode.m in Sources */,
Expand Down Expand Up @@ -3201,6 +3201,7 @@
7136A47A1E8918E60024FC3D /* XCUIElement+FBPickerWheel.m in Sources */,
E444DC84249131B10060D7EB /* DDRange.m in Sources */,
6385F4A7220A40760095BBDB /* XCUIApplicationProcessDelay.m in Sources */,
71A5C67529A4F39600421C37 /* XCTIssue+FBPatcher.m in Sources */,
711084451DA3AA7500F913D6 /* FBXPath.m in Sources */,
719CD8FD2126C88B00C7D0C2 /* XCUIApplication+FBAlert.m in Sources */,
13DE7A45287C2A8D003243C6 /* FBXCAccessibilityElement.m in Sources */,
Expand Down Expand Up @@ -3241,7 +3242,6 @@
EE158AE21CBD456F00A3E3F0 /* FBRouteRequest.m in Sources */,
EE158ADB1CBD456F00A3E3F0 /* FBResponseJSONPayload.m in Sources */,
714EAA0F2673FDFE005C5B47 /* FBCapabilities.m in Sources */,
EE7E271F1D06C69F001BEC7B /* FBXCTestCaseImplementationFailureHoldingProxy.m in Sources */,
7155D704211DCEF400166C20 /* FBMjpegServer.m in Sources */,
EEDFE1221D9C06F800E6FFE5 /* XCUIDevice+FBHealthCheck.m in Sources */,
714D88CE2733FB970074A925 /* FBXMLGenerationOptions.m in Sources */,
Expand Down
18 changes: 18 additions & 0 deletions WebDriverAgentLib/Categories/XCTIssue+FBPatcher.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

#import <XCTest/XCTest.h>

NS_ASSUME_NONNULL_BEGIN

@interface XCTIssue (AMPatcher)

@end

NS_ASSUME_NONNULL_END
33 changes: 33 additions & 0 deletions WebDriverAgentLib/Categories/XCTIssue+FBPatcher.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

#import "XCTIssue+FBPatcher.h"

#import <objc/runtime.h>

static _Bool swizzledShouldInterruptTest(id self, SEL _cmd)
{
return NO;
}

@implementation XCTIssue (AMPatcher)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-load-method"
+ (void)load
{
SEL originalShouldInterruptTest = NSSelectorFromString(@"shouldInterruptTest");
if (nil == originalShouldInterruptTest) return;
Method originalShouldInterruptTestMethod = class_getInstanceMethod(self.class, originalShouldInterruptTest);
if (nil == originalShouldInterruptTestMethod) return;
method_setImplementation(originalShouldInterruptTestMethod, (IMP)swizzledShouldInterruptTest);
}
#pragma clang diagnostic pop

@end
38 changes: 21 additions & 17 deletions WebDriverAgentLib/Utilities/FBFailureProofTestCase.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@

#import "FBFailureProofTestCase.h"

#import "FBExceptions.h"
#import "FBLogger.h"
#import "FBXCTestCaseImplementationFailureHoldingProxy.h"

@interface FBFailureProofTestCase ()
@property (nonatomic, assign) BOOL didRegisterAXTestFailure;
@end

@implementation FBFailureProofTestCase

Expand All @@ -28,6 +22,26 @@ - (void)setUp
self.shouldHaltWhenReceivesControl = NO;
}

- (void)_recordIssue:(XCTIssue *)issue
{
NSString *description = [NSString stringWithFormat:@"%@ (%@)", issue.compactDescription, issue.associatedError.description];
[FBLogger logFmt:@"Issue type: %ld", issue.type];
[self _enqueueFailureWithDescription:description
inFile:issue.sourceCodeContext.location.fileURL.path
atLine:issue.sourceCodeContext.location.lineNumber
// 5 == XCTIssueTypeUnmatchedExpectedFailure
expected:issue.type == 5];
mykola-mokhnach marked this conversation as resolved.
Show resolved Hide resolved
}

- (void)_recordIssue:(XCTIssue *)issue forCaughtError:(id)error
{
[self _recordIssue:issue];
}

- (void)recordIssue:(XCTIssue *)issue
{
[self _recordIssue:issue];
}

/**
Override 'recordFailureWithDescription' to not stop by failures.
Expand All @@ -49,17 +63,7 @@ - (void)_enqueueFailureWithDescription:(NSString *)description
expected:(BOOL)expected
{
[FBLogger logFmt:@"Enqueue Failure: %@ %@ %lu %d", description, filePath, (unsigned long)lineNumber, expected];
const BOOL isPossibleDeadlock = ([description rangeOfString:@"Failed to get refreshed snapshot"].location != NSNotFound);
if (!isPossibleDeadlock) {
self.didRegisterAXTestFailure = YES;
}
else if (self.didRegisterAXTestFailure) {
self.didRegisterAXTestFailure = NO; // Reseting to NO to enable future deadlock detection
[[NSException exceptionWithName:FBApplicationDeadlockDetectedException
reason:@"Can't communicate with deadlocked application"
userInfo:nil]
raise];
}
// TODO: Figure out which error types we want to escalate
}

@end

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions WebDriverAgentLib/WebDriverAgentLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ FOUNDATION_EXPORT const unsigned char WebDriverAgentLib_VersionString[];
#import <WebDriverAgentLib/XCUIElement+FBForceTouch.h>
#import <WebDriverAgentLib/XCUIElement+FBUtilities.h>
#import <WebDriverAgentLib/XCUIElement+FBWebDriverAttributes.h>
#import <WebDriverAgentLib/XCTIssue+FBPatcher.h>