Skip to content

Commit 5c6d8ea

Browse files
authored
fix(api): OperationsManager crash (#1598)
* fix(api): OperationsManager crash * chore: Update CircleCI config * Try remove deployment target
1 parent b6968e3 commit 5c6d8ea

File tree

8 files changed

+108
-62
lines changed

8 files changed

+108
-62
lines changed

.circleci/config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ jobs:
131131
command: melos run lint:ios:<< parameters.plugin >>
132132
- run:
133133
name: Pre-start iOS simulator
134-
# xcrun instruments returns non zero, but successfully starts the simulator
135-
command: xcrun instruments -w "iPhone 11 (14.5) [" || true
134+
command: xcrun simctl boot "iPhone 13" || true
136135
- run:
137136
name: Build example iOS apps
138137
command: |

.circleci/test_all_plugins.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ case $test_suite in
9191
cd "./${plugin}_ios"
9292
fi
9393
if [ -d "example/ios/unit_tests" ]; then
94-
XCODEBUILD_DESTINATION="platform=iOS Simulator,name=iPhone 12"
94+
XCODEBUILD_DESTINATION="platform=iOS Simulator,name=iPhone 13,OS=latest"
9595
if [ ! -f $dummy_file_path ]; then
9696
cp ${project_root_dir}/.circleci/dummy_amplifyconfiguration.dart $dummy_file_path
9797
fi
Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,48 @@
1-
21
# Uncomment this line to define a global platform for your project
32
platform :ios, '13.0'
3+
44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6+
67
project 'Runner', {
78
'Debug' => :debug,
89
'Profile' => :release,
910
'Release' => :release,
1011
}
12+
1113
def flutter_root
1214
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
1315
unless File.exist?(generated_xcode_build_settings_path)
1416
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
1517
end
18+
1619
File.foreach(generated_xcode_build_settings_path) do |line|
1720
matches = line.match(/FLUTTER_ROOT\=(.*)/)
1821
return matches[1].strip if matches
1922
end
2023
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
2124
end
25+
2226
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27+
2328
flutter_ios_podfile_setup
29+
2430
target 'Runner' do
2531
use_frameworks!
2632
use_modular_headers!
33+
2734
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35+
36+
target 'unit_tests' do
37+
inherit! :complete
38+
end
2839
end
29-
target 'unit_tests' do
30-
use_frameworks!
31-
use_modular_headers!
32-
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
33-
end
40+
3441
post_install do |installer|
3542
installer.pods_project.targets.each do |target|
3643
flutter_additional_ios_build_settings(target)
3744
target.build_configurations.each do |config|
38-
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
39-
end
45+
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
46+
end
4047
end
41-
end
48+
end

packages/api/amplify_api_ios/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
123545BECD4D47EC250B9B83 /* Pods_Runner_unit_tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E065FE7E2AC456070F49D524 /* Pods_Runner_unit_tests.framework */; };
1011
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11-
16D12C32C011DDCB087F3853 /* Pods_unit_tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E925D89EB49B46F2BE3F0C2 /* Pods_unit_tests.framework */; };
1212
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1313
4BF054AD269DE2FB00D1F2BF /* FlutterURLSessionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BF054AC269DE2FB00D1F2BF /* FlutterURLSessionTests.swift */; };
1414
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
@@ -44,8 +44,8 @@
4444
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
4545
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4646
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
47+
7C472834B84A06C56B7D6513 /* Pods-Runner-unit_tests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner-unit_tests.profile.xcconfig"; path = "Target Support Files/Pods-Runner-unit_tests/Pods-Runner-unit_tests.profile.xcconfig"; sourceTree = "<group>"; };
4748
840F5D16259C147800C968A8 /* RestApiUnitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RestApiUnitTests.swift; sourceTree = "<group>"; };
48-
8E925D89EB49B46F2BE3F0C2 /* Pods_unit_tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_unit_tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4949
90DD67FD40F3A829F3077B3A /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
5050
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
5151
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
@@ -54,8 +54,11 @@
5454
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5555
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5656
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
57+
A7C906B26BDAC0A9C3209F70 /* Pods-Runner-unit_tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner-unit_tests.debug.xcconfig"; path = "Target Support Files/Pods-Runner-unit_tests/Pods-Runner-unit_tests.debug.xcconfig"; sourceTree = "<group>"; };
5758
B6685C325F27A8C0B26D98A7 /* Pods-unit_tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-unit_tests.debug.xcconfig"; path = "Target Support Files/Pods-unit_tests/Pods-unit_tests.debug.xcconfig"; sourceTree = "<group>"; };
5859
D3A8202E9399B25BFA8BE017 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
60+
E065FE7E2AC456070F49D524 /* Pods_Runner_unit_tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner_unit_tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
61+
E64A87D0B381B88F6224E9D3 /* Pods-Runner-unit_tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner-unit_tests.release.xcconfig"; path = "Target Support Files/Pods-Runner-unit_tests/Pods-Runner-unit_tests.release.xcconfig"; sourceTree = "<group>"; };
5962
FB5A68363B6B37FF08D57206 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
6063
FB7C4071259A81DF0021F98A /* unit_tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = unit_tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
6164
FB7C4073259A81E00021F98A /* GraphQLApiUnitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GraphQLApiUnitTests.swift; sourceTree = "<group>"; };
@@ -75,7 +78,7 @@
7578
isa = PBXFrameworksBuildPhase;
7679
buildActionMask = 2147483647;
7780
files = (
78-
16D12C32C011DDCB087F3853 /* Pods_unit_tests.framework in Frameworks */,
81+
123545BECD4D47EC250B9B83 /* Pods_Runner_unit_tests.framework in Frameworks */,
7982
);
8083
runOnlyForDeploymentPostprocessing = 0;
8184
};
@@ -91,6 +94,9 @@
9194
B6685C325F27A8C0B26D98A7 /* Pods-unit_tests.debug.xcconfig */,
9295
73298780EBF87BD7DFB72685 /* Pods-unit_tests.release.xcconfig */,
9396
09EB9CDD8C0166DA23FB1EFF /* Pods-unit_tests.profile.xcconfig */,
97+
A7C906B26BDAC0A9C3209F70 /* Pods-Runner-unit_tests.debug.xcconfig */,
98+
E64A87D0B381B88F6224E9D3 /* Pods-Runner-unit_tests.release.xcconfig */,
99+
7C472834B84A06C56B7D6513 /* Pods-Runner-unit_tests.profile.xcconfig */,
94100
);
95101
path = Pods;
96102
sourceTree = "<group>";
@@ -146,7 +152,7 @@
146152
isa = PBXGroup;
147153
children = (
148154
30DF0857352AA115AF86C33E /* Pods_Runner.framework */,
149-
8E925D89EB49B46F2BE3F0C2 /* Pods_unit_tests.framework */,
155+
E065FE7E2AC456070F49D524 /* Pods_Runner_unit_tests.framework */,
150156
);
151157
name = Frameworks;
152158
sourceTree = "<group>";
@@ -195,7 +201,7 @@
195201
FB7C406D259A81DF0021F98A /* Sources */,
196202
FB7C406E259A81DF0021F98A /* Frameworks */,
197203
FB7C406F259A81DF0021F98A /* Resources */,
198-
F6B0C0509717CB5B80B97A37 /* [CP] Embed Pods Frameworks */,
204+
2997F4696A7D62B3B5C5F89F /* [CP] Embed Pods Frameworks */,
199205
);
200206
buildRules = (
201207
);
@@ -281,13 +287,30 @@
281287
outputFileListPaths = (
282288
);
283289
outputPaths = (
284-
"$(DERIVED_FILE_DIR)/Pods-unit_tests-checkManifestLockResult.txt",
290+
"$(DERIVED_FILE_DIR)/Pods-Runner-unit_tests-checkManifestLockResult.txt",
285291
);
286292
runOnlyForDeploymentPostprocessing = 0;
287293
shellPath = /bin/sh;
288294
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
289295
showEnvVarsInLog = 0;
290296
};
297+
2997F4696A7D62B3B5C5F89F /* [CP] Embed Pods Frameworks */ = {
298+
isa = PBXShellScriptBuildPhase;
299+
buildActionMask = 2147483647;
300+
files = (
301+
);
302+
inputFileListPaths = (
303+
"${PODS_ROOT}/Target Support Files/Pods-Runner-unit_tests/Pods-Runner-unit_tests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
304+
);
305+
name = "[CP] Embed Pods Frameworks";
306+
outputFileListPaths = (
307+
"${PODS_ROOT}/Target Support Files/Pods-Runner-unit_tests/Pods-Runner-unit_tests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
308+
);
309+
runOnlyForDeploymentPostprocessing = 0;
310+
shellPath = /bin/sh;
311+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner-unit_tests/Pods-Runner-unit_tests-frameworks.sh\"\n";
312+
showEnvVarsInLog = 0;
313+
};
291314
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
292315
isa = PBXShellScriptBuildPhase;
293316
buildActionMask = 2147483647;
@@ -355,23 +378,6 @@
355378
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
356379
showEnvVarsInLog = 0;
357380
};
358-
F6B0C0509717CB5B80B97A37 /* [CP] Embed Pods Frameworks */ = {
359-
isa = PBXShellScriptBuildPhase;
360-
buildActionMask = 2147483647;
361-
files = (
362-
);
363-
inputFileListPaths = (
364-
"${PODS_ROOT}/Target Support Files/Pods-unit_tests/Pods-unit_tests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
365-
);
366-
name = "[CP] Embed Pods Frameworks";
367-
outputFileListPaths = (
368-
"${PODS_ROOT}/Target Support Files/Pods-unit_tests/Pods-unit_tests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
369-
);
370-
runOnlyForDeploymentPostprocessing = 0;
371-
shellPath = /bin/sh;
372-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-unit_tests/Pods-unit_tests-frameworks.sh\"\n";
373-
showEnvVarsInLog = 0;
374-
};
375381
/* End PBXShellScriptBuildPhase section */
376382

377383
/* Begin PBXSourcesBuildPhase section */
@@ -663,7 +669,7 @@
663669
};
664670
FB7C4076259A81E00021F98A /* Debug */ = {
665671
isa = XCBuildConfiguration;
666-
baseConfigurationReference = B6685C325F27A8C0B26D98A7 /* Pods-unit_tests.debug.xcconfig */;
672+
baseConfigurationReference = A7C906B26BDAC0A9C3209F70 /* Pods-Runner-unit_tests.debug.xcconfig */;
667673
buildSettings = {
668674
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
669675
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -698,7 +704,7 @@
698704
};
699705
FB7C4077259A81E00021F98A /* Release */ = {
700706
isa = XCBuildConfiguration;
701-
baseConfigurationReference = 73298780EBF87BD7DFB72685 /* Pods-unit_tests.release.xcconfig */;
707+
baseConfigurationReference = E64A87D0B381B88F6224E9D3 /* Pods-Runner-unit_tests.release.xcconfig */;
702708
buildSettings = {
703709
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
704710
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
@@ -730,7 +736,7 @@
730736
};
731737
FB7C4078259A81E00021F98A /* Profile */ = {
732738
isa = XCBuildConfiguration;
733-
baseConfigurationReference = 09EB9CDD8C0166DA23FB1EFF /* Pods-unit_tests.profile.xcconfig */;
739+
baseConfigurationReference = 7C472834B84A06C56B7D6513 /* Pods-Runner-unit_tests.profile.xcconfig */;
734740
buildSettings = {
735741
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
736742
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";

packages/api/amplify_api_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
33
LastUpgradeVersion = "1300"
4-
version = "1.3">
4+
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
@@ -27,6 +27,7 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES"
30+
enableThreadSanitizer = "YES"
3031
codeCoverageEnabled = "YES"
3132
onlyGenerateCoverageForSpecifiedTargets = "YES">
3233
<MacroExpansion>
@@ -41,9 +42,9 @@
4142
<CodeCoverageTargets>
4243
<BuildableReference
4344
BuildableIdentifier = "primary"
44-
BlueprintIdentifier = "CA410D8C5DEDC60CB18A2E22CA5E08C6"
45-
BuildableName = "amplify_api.framework"
46-
BlueprintName = "amplify_api"
45+
BlueprintIdentifier = "7D6497A44463E45EAE4E358D2CF4181A"
46+
BuildableName = "amplify_api_ios.framework"
47+
BlueprintName = "amplify_api_ios"
4748
ReferencedContainer = "container:Pods/Pods.xcodeproj">
4849
</BuildableReference>
4950
</CodeCoverageTargets>
@@ -57,6 +58,10 @@
5758
BlueprintName = "unit_tests"
5859
ReferencedContainer = "container:Runner.xcodeproj">
5960
</BuildableReference>
61+
<LocationScenarioReference
62+
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
63+
referenceType = "1">
64+
</LocationScenarioReference>
6065
</TestableReference>
6166
</Testables>
6267
</TestAction>

packages/api/amplify_api_ios/example/ios/Runner/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@
4141
</array>
4242
<key>UIViewControllerBasedStatusBarAppearance</key>
4343
<false/>
44+
<key>CADisableMinimumFrameDurationOnPhone</key>
45+
<true/>
4446
</dict>
4547
</plist>

packages/api/amplify_api_ios/example/ios/unit_tests/FlutterURLSessionTests.swift

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -298,39 +298,60 @@ class FlutterURLSessionTests: XCTestCase {
298298
}
299299
}
300300

301-
func skip_test_session_records_success_response() {
301+
func test_session_records_success_response() {
302302
runForAllVerbs { method, body in
303303
runMockTest(statusCode: 200, method: method, body: body)
304304
}
305305
}
306306

307-
func skip_test_session_records_failure_response() {
307+
func test_session_records_failure_response() {
308308
runForAllVerbs { method, body in
309309
runMockTest(statusCode: 400, method: method, body: body)
310310
}
311311
}
312312

313-
func skip_test_aws_operation_records_success_response() {
313+
func test_aws_operation_records_success_response() {
314314
runForAllVerbs { method, body in
315315
runAWSTest(statusCode: 200, method: method, body: body)
316316
}
317317
}
318318

319-
func skip_test_aws_operation_records_failure_response() {
319+
func test_aws_operation_records_failure_response() {
320320
runForAllVerbs { method, body in
321321
runAWSTest(statusCode: 400, method: method, body: body)
322322
}
323323
}
324324

325-
func skip_test_flutter_receives_success_response() {
325+
func test_flutter_receives_success_response() {
326326
runForAllVerbs { method, body in
327327
runFlutterTest(statusCode: 200, method: method, body: body)
328328
}
329329
}
330330

331-
func skip_test_flutter_receives_error_response() {
331+
func test_flutter_receives_error_response() {
332332
runForAllVerbs { method, body in
333333
runFlutterTest(statusCode: 400, method: method, body: body)
334334
}
335335
}
336+
337+
func test_concurrent_operations() {
338+
let cancelToken = "cancelToken"
339+
let operation = makeOperation()
340+
DispatchQueue.concurrentPerform(iterations: 100) { i in
341+
if i.isMultiple(of: 2) {
342+
OperationsManager.addOperation(cancelToken: cancelToken, operation: operation)
343+
} else {
344+
_ = OperationsManager.containsOperation(cancelToken: cancelToken)
345+
}
346+
}
347+
XCTAssertTrue(OperationsManager.containsOperation(cancelToken: cancelToken))
348+
DispatchQueue.concurrentPerform(iterations: 100) { i in
349+
if i.isMultiple(of: 2) {
350+
OperationsManager.removeOperation(cancelToken: cancelToken)
351+
} else {
352+
_ = OperationsManager.getResponse(for: cancelToken)
353+
}
354+
}
355+
XCTAssertFalse(OperationsManager.containsOperation(cancelToken: cancelToken))
356+
}
336357
}

0 commit comments

Comments
 (0)