Add iOS client hang test
Summary: Check that it never hangs or crashes during startup Reviewed By: priteshrnandgaonkar Differential Revision: D10034630 fbshipit-source-id: b69ce9e6f91a5499a084c4d7328e6934ec92ece4
This commit is contained in:
committed by
Facebook Github Bot
parent
7e296467d2
commit
3118814ddc
@@ -61,14 +61,15 @@ using WrapperPlugin = facebook::flipper::FlipperCppWrapperPlugin;
|
||||
deviceName = [NSString stringWithFormat:@"%@ %@", [[UIDevice currentDevice] model], @"Simulator"];
|
||||
#endif
|
||||
|
||||
static const std::string UNKNOWN = std::string("unknown");
|
||||
facebook::flipper::FlipperClient::init({
|
||||
{
|
||||
"localhost",
|
||||
"iOS",
|
||||
[deviceName UTF8String],
|
||||
"unknown",
|
||||
[appName UTF8String],
|
||||
[appId UTF8String],
|
||||
UNKNOWN,
|
||||
[appName UTF8String] ?: UNKNOWN,
|
||||
[appId UTF8String] ?: UNKNOWN,
|
||||
[privateAppDirectory UTF8String],
|
||||
},
|
||||
sonarThread.getEventBase(),
|
||||
|
||||
26
iOS/SonarKitTests/FlipperClientTests.mm
Normal file
26
iOS/SonarKitTests/FlipperClientTests.mm
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) 2018-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#if FB_SONARKIT_ENABLED
|
||||
|
||||
#import <FlipperKit/FlipperClient.h>
|
||||
|
||||
@interface FlipperClientTests : XCTestCase
|
||||
@end
|
||||
|
||||
@implementation FlipperClientTests
|
||||
|
||||
- (void)testStartingClientDoesntCrashOrHang {
|
||||
FlipperClient *client = [FlipperClient sharedClient];
|
||||
[client start];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user