带阿里标识的版本

This commit is contained in:
robin
2026-02-28 18:55:33 +08:00
parent 150799f41d
commit 5d0b7c7e91
477 changed files with 10813 additions and 4044 deletions

View File

@@ -1,9 +1,9 @@
//
// ResolvingEffectiveHostTest.m
// AlicloudHttpDNSTests
// TrustHttpDNSTests
//
// Created by xuyecan on 2024/5/28.
// Copyright © 2024 alibaba-inc.com. All rights reserved.
// Copyright © 2024 trustapp.com. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -42,8 +42,8 @@
[super tearDown];
}
- (int64_t)httpdnsHost:(NSString *)host ipType:(AlicloudHttpDNS_IPType)ipType ttl:(int64_t)ttl {
// ttl1-4
- (int64_t)httpdnsHost:(NSString *)host ipType:(TrustHttpDNS_IPType)ipType ttl:(int64_t)ttl {
// ttl<EFBFBD><EFBFBD>?-4<EFBFBD><EFBFBD>?
return arc4random_uniform(4) + 1;
}
@@ -87,7 +87,7 @@
long long executeStartTimeInMs = [[NSDate date] timeIntervalSince1970] * 1000;
HttpdnsResult *result = [self.httpdns resolveHostSyncNonBlocking:host byIpType:HttpdnsQueryIPTypeIpv4];
long long executeEndTimeInMs = [[NSDate date] timeIntervalSince1970] * 1000;
// 30ms
// <EFBFBD><EFBFBD>?0ms
if (executeEndTimeInMs - executeStartTimeInMs >= 30) {
printf("XCTAssertWillFailed, host: %s, executeTime: %lldms\n", [host UTF8String], executeEndTimeInMs - executeStartTimeInMs);
}