Skip to content

Commit 7a929b3

Browse files
authored
fix(storage): increase integration test network timeout (#2447)
1 parent d9673d2 commit 7a929b3

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

AmplifyAsyncTesting/Sources/AsyncTesting/XCTestCase+AsyncTesting.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import XCTest
1010

1111
extension XCTestCase {
1212
public static let defaultTimeoutForAsyncExpectations = TimeInterval(60)
13-
public static let defaultNetworkTimeoutForAsyncExpectations = TimeInterval(300)
13+
public static let defaultNetworkTimeoutForAsyncExpectations = TimeInterval(600)
1414

1515
/// Creates a new async expectation with an associated description.
1616
///

AmplifyPlugins/Storage/Tests/StorageHostApp/AWSS3StoragePluginIntegrationTests/Helpers/TestConfigHelper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ class TestConfigHelper {
3939
}
4040

4141
class TestCommonConstants {
42-
static let networkTimeout = TimeInterval(300)
42+
static let networkTimeout = TimeInterval(600)
4343
}

AmplifyPlugins/Storage/Tests/StorageHostApp/AWSS3StoragePluginIntegrationTests/ResumabilityTests/AWSS3StoragePluginGetDataResumabilityTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AWSS3StoragePluginDownloadDataResumabilityTests: AWSS3StoragePluginTestBas
1818
/// When: Call the get API then pause
1919
/// Then: The operation is stalled (no progress, completed, or failed event)
2020
func testDownloadDataAndPause() async throws {
21-
try await testTask(timeout: 300) {
21+
try await testTask(timeout: 600) {
2222
let key = UUID().uuidString
2323
let data = AWSS3StoragePluginTestBase.smallDataObject
2424
let uploadKey = try await Amplify.Storage.uploadData(key: key, data: data).value
@@ -70,7 +70,7 @@ class AWSS3StoragePluginDownloadDataResumabilityTests: AWSS3StoragePluginTestBas
7070
/// When: Call the downloadData API, pause, and then resume the operation
7171
/// Then: The operation should complete successfully
7272
func testDownloadDataAndPauseThenResume() async throws {
73-
try await testTask(timeout: 300) {
73+
try await testTask(timeout: 600) {
7474
let key = UUID().uuidString
7575
let data = AWSS3StoragePluginTestBase.smallDataObject
7676
let uploadKey = try await Amplify.Storage.uploadData(key: key, data: data).value
@@ -123,7 +123,7 @@ class AWSS3StoragePluginDownloadDataResumabilityTests: AWSS3StoragePluginTestBas
123123
/// When: Call the get API then cancel the operation,
124124
/// Then: The operation should not complete or fail.
125125
func testDownloadDataAndCancel() async throws {
126-
try await testTask(timeout: 300) {
126+
try await testTask(timeout: 600) {
127127
let key = UUID().uuidString
128128
let data = AWSS3StoragePluginTestBase.smallDataObject
129129
let uploadKey = try await Amplify.Storage.uploadData(key: key, data: data).value

AmplifyPlugins/Storage/Tests/StorageHostApp/AWSS3StoragePluginIntegrationTests/ResumabilityTests/AWSS3StoragePluginPutDataResumabilityTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class AWSS3StoragePluginUploadDataResumabilityTests: AWSS3StoragePluginTestBase
1717
/// When: Call the put API and pause the operation
1818
/// Then: The operation is stalled (no progress, completed, or failed event)
1919
func testUploadLargeDataThenPause() async throws {
20-
try await testTask(timeout: 300) {
20+
try await testTask(timeout: 600) {
2121
let key = UUID().uuidString
2222
Self.logger.debug("Uploading data")
2323
let task = try await Amplify.Storage.uploadData(key: key, data: AWSS3StoragePluginTestBase.largeDataObject)
@@ -65,7 +65,7 @@ class AWSS3StoragePluginUploadDataResumabilityTests: AWSS3StoragePluginTestBase
6565
/// When: Call the put API, pause, and then resume the operation,
6666
/// Then: The operation should complete successfully
6767
func testUploadLargeDataAndPauseThenResume() async throws {
68-
try await testTask(timeout: 300) {
68+
try await testTask(timeout: 600) {
6969
let key = UUID().uuidString
7070
Self.logger.debug("Uploading data")
7171
let task = try await Amplify.Storage.uploadData(key: key, data: AWSS3StoragePluginTestBase.largeDataObject)
@@ -112,7 +112,7 @@ class AWSS3StoragePluginUploadDataResumabilityTests: AWSS3StoragePluginTestBase
112112
/// When: Call the put API, pause, and then resume tthe operation,
113113
/// Then: The operation should complete successfully
114114
func testUploadLargeDataAndCancel() async throws {
115-
try await testTask(timeout: 300) {
115+
try await testTask(timeout: 600) {
116116
let key = UUID().uuidString
117117
Self.logger.debug("Uploading data")
118118
let task = try await Amplify.Storage.uploadData(key: key, data: AWSS3StoragePluginTestBase.largeDataObject)

0 commit comments

Comments
 (0)