File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,18 @@ @implementation InetAddress
2727@end
2828
2929#define CustomIPValue @" 192.168.1.1"
30+ #define kCustomHost @" uplog.qbox.me"
31+ #define kDnsTestToken token_na0
32+
3033@interface CustomDns : NSObject <QNDnsDelegate>
3134@property (nonatomic , assign )BOOL isTestTtl;
3235@end
3336@implementation CustomDns
3437
3538- (NSArray <id<QNIDnsNetworkAddress>> *)lookup : (NSString *)host {
39+ if (![host isEqualToString: kCustomHost ]) {
40+ return nil ;
41+ }
3642
3743 InetAddress *inetAddress = [[InetAddress alloc ] init ];
3844 inetAddress.hostValue = host;
@@ -56,8 +62,6 @@ @interface QNDnsPrefetcherTest : XCTestCase
5662
5763@implementation QNDnsPrefetcherTest
5864
59- #define kCustomHost @" uplog.qbox.me"
60- #define kDnsTestToken token_na0
6165- (void )setUp {
6266
6367 [kQNTransactionManager destroyResource ];
You can’t perform that action at this time.
0 commit comments