Skip to content

Commit

Permalink
test: timeouts, parallelization, and 4xx assertion (#3060)
Browse files Browse the repository at this point in the history
  • Loading branch information
atierian authored Jun 28, 2023
1 parent b01acf0 commit fc5dd83
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/integ_test_storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:

jobs:
storage-integration-test-iOS:
runs-on: macos-12
runs-on: macos-13
environment: IntegrationTest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
Expand All @@ -32,6 +32,8 @@ jobs:
with:
project_path: ./AmplifyPlugins/Storage/Tests/StorageHostApp/
scheme: AWSS3StoragePluginIntegrationTests
destination: 'platform=iOS Simulator,name=iPhone 14,OS=latest'
xcode_path: '/Applications/Xcode_14.3.app'

storage-integration-test-tvOS:
runs-on: macos-13
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class GraphQLMutateCombineTests: OperationTestBase {
}
})

waitForExpectations(timeout: 0.05)
waitForExpectations(timeout: 1.0)
sink.cancel()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "903555F729141355004B83C2"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6875F8EF2A3CCC84001C9AAF"
BuildableName = "PredictionsWatchApp.app"
BlueprintName = "PredictionsWatchApp"
ReferencedContainer = "container:PredictionsHostApp.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6875F8EF2A3CCC84001C9AAF"
BuildableName = "PredictionsWatchApp.app"
BlueprintName = "PredictionsWatchApp"
ReferencedContainer = "container:PredictionsHostApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6875F8EF2A3CCC84001C9AAF"
BuildableName = "PredictionsWatchApp.app"
BlueprintName = "PredictionsWatchApp"
ReferencedContainer = "container:PredictionsHostApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ class AWSS3StoragePluginOptionsUsabilityTests: AWSS3StoragePluginTestBase {
return
}

XCTAssertEqual(response.statusCode, 403)
XCTAssertTrue((400..<500).contains(response.statusCode))
}
task2.resume()
await waitForExpectations(timeout: TestCommonConstants.networkTimeout)
await fulfillment(of: [urlExpired], timeout: TestCommonConstants.networkTimeout)

// Remove the key
await remove(key: key)
Expand Down

0 comments on commit fc5dd83

Please sign in to comment.