Skip to content

Commit 13c4933

Browse files
committed
chore: update stress tests github action
1 parent 8e6dedf commit 13c4933

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

.github/workflows/stress_test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
scheme: AuthStressTests
6969
destination: ${{ env.DESTINATION }}
7070
xcode_path: '/Applications/Xcode_${{ env.XCODE_VERSION }}.app'
71-
other_flags: -parallel-testing-enabled NO
71+
other_flags: -test-iterations 3 -retry-tests-on-failure -parallel-testing-enabled NO -test-repetition-relaunch-enabled YES
7272

7373
geo-stress-test:
7474
needs: prepare-for-test
@@ -100,7 +100,7 @@ jobs:
100100
scheme: GeoStressTests
101101
destination: ${{ env.DESTINATION }}
102102
xcode_path: '/Applications/Xcode_${{ env.XCODE_VERSION }}.app'
103-
other_flags: -parallel-testing-enabled NO
103+
other_flags: -test-iterations 3 -retry-tests-on-failure -parallel-testing-enabled NO -test-repetition-relaunch-enabled YES
104104

105105
storage-stress-test:
106106
needs: prepare-for-test
@@ -132,7 +132,7 @@ jobs:
132132
scheme: StorageStressTests
133133
destination: ${{ env.DESTINATION }}
134134
xcode_path: '/Applications/Xcode_${{ env.XCODE_VERSION }}.app'
135-
other_flags: -parallel-testing-enabled NO
135+
other_flags: -test-iterations 3 -retry-tests-on-failure -parallel-testing-enabled NO -test-repetition-relaunch-enabled YES
136136

137137
datastore-stress-test:
138138
needs: prepare-for-test
@@ -164,7 +164,7 @@ jobs:
164164
scheme: DatastoreStressTests
165165
destination: ${{ env.DESTINATION }}
166166
xcode_path: '/Applications/Xcode_${{ env.XCODE_VERSION }}.app'
167-
other_flags: -parallel-testing-enabled NO
167+
other_flags: -test-iterations 3 -retry-tests-on-failure -parallel-testing-enabled NO -test-repetition-relaunch-enabled YES
168168

169169
graphql-api-stress-test:
170170
needs: prepare-for-test
@@ -196,4 +196,4 @@ jobs:
196196
scheme: GraphQLAPIStressTests
197197
destination: ${{ env.DESTINATION }}
198198
xcode_path: '/Applications/Xcode_${{ env.XCODE_VERSION }}.app'
199-
other_flags: -parallel-testing-enabled NO
199+
other_flags: -test-iterations 3 -retry-tests-on-failure -parallel-testing-enabled NO -test-repetition-relaunch-enabled YES

AmplifyPlugins/API/Tests/APIHostApp/GraphQLAPIStressTests/GraphQLAPIStressTests.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,10 @@ final class APIStressTests: XCTestCase {
4141
}
4242

4343
override func setUp() async throws {
44-
await Amplify.reset()
45-
Amplify.Logging.logLevel = .verbose
46-
let plugin = AWSAPIPlugin(modelRegistration: TestModelRegistration())
47-
4844
do {
45+
Amplify.Logging.logLevel = .verbose
46+
let plugin = AWSAPIPlugin(modelRegistration: TestModelRegistration())
4947
try Amplify.add(plugin: plugin)
50-
5148
let amplifyConfig = try TestConfigHelper.retrieveAmplifyConfiguration(
5249
forResource: Self.amplifyConfiguration)
5350
try Amplify.configure(amplifyConfig)
@@ -58,6 +55,7 @@ final class APIStressTests: XCTestCase {
5855

5956
override func tearDown() async throws {
6057
await Amplify.reset()
58+
try await Task.sleep(seconds: 1)
6159
}
6260

6361
// MARK: - Stress tests

0 commit comments

Comments
 (0)