Skip to content

Commit 1bfde62

Browse files
authored
chore: kickoff release
2 parents 195f0db + 99f66d3 commit 1bfde62

File tree

11 files changed

+48
-16
lines changed

11 files changed

+48
-16
lines changed

.github/workflows/integ_test_datastore_auth_cognito.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
scheme: AWSDataStorePluginAuthCognitoTests
3636
destination: 'platform=iOS Simulator,name=iPhone 14,OS=16.4'
3737
xcode_path: '/Applications/Xcode_14.3.app'
38+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
3839

3940
datastore-integration-auth-cognito-test-tvOS:
4041
timeout-minutes: 60
@@ -64,6 +65,7 @@ jobs:
6465
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=latest
6566
sdk: appletvsimulator
6667
xcode_path: '/Applications/Xcode_14.3.app'
68+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
6769

6870
datastore-integration-auth-cognito-test-watchOS:
6971
timeout-minutes: 60
@@ -93,3 +95,4 @@ jobs:
9395
destination: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=latest
9496
sdk: watchsimulator
9597
xcode_path: '/Applications/Xcode_14.3.app'
98+
other_flags: '-test-iterations 3 -retry-tests-on-failure'

.github/workflows/integ_test_datastore_auth_iam.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
scheme: AWSDataStorePluginAuthIAMTests
3636
destination: 'platform=iOS Simulator,name=iPhone 14,OS=16.4'
3737
xcode_path: '/Applications/Xcode_14.3.app'
38+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
3839

3940
datastore-integration-auth-iam-test-tvOS:
4041
timeout-minutes: 60
@@ -64,6 +65,7 @@ jobs:
6465
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=latest
6566
sdk: appletvsimulator
6667
xcode_path: '/Applications/Xcode_14.3.app'
68+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
6769

6870
datastore-integration-auth-iam-test-watchOS:
6971
timeout-minutes: 60
@@ -93,3 +95,4 @@ jobs:
9395
destination: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=latest
9496
sdk: watchsimulator
9597
xcode_path: '/Applications/Xcode_14.3.app'
98+
other_flags: '-test-iterations 3 -retry-tests-on-failure'

.github/workflows/integ_test_datastore_base.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
scheme: AWSDataStorePluginIntegrationTests
3636
destination: 'platform=iOS Simulator,name=iPhone 14,OS=16.4'
3737
xcode_path: '/Applications/Xcode_14.3.app'
38+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
3839

3940
datastore-integration-test-base-tvOS:
4041
timeout-minutes: 60
@@ -64,6 +65,7 @@ jobs:
6465
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=latest
6566
sdk: appletvsimulator
6667
xcode_path: '/Applications/Xcode_14.3.app'
68+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
6769

6870
datastore-integration-test-base-watchOS:
6971
timeout-minutes: 60
@@ -93,3 +95,4 @@ jobs:
9395
destination: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=latest
9496
sdk: watchsimulator
9597
xcode_path: '/Applications/Xcode_14.3.app'
98+
other_flags: '-test-iterations 3 -retry-tests-on-failure'

.github/workflows/integ_test_datastore_cpk.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
scheme: AWSDataStorePluginCPKTests
3636
destination: 'platform=iOS Simulator,name=iPhone 14,OS=16.4'
3737
xcode_path: '/Applications/Xcode_14.3.app'
38+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
3839

3940
datastore-integration-cpk-test-tvOS:
4041
timeout-minutes: 60
@@ -64,6 +65,7 @@ jobs:
6465
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=latest
6566
sdk: appletvsimulator
6667
xcode_path: '/Applications/Xcode_14.3.app'
68+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
6769

6870
datastore-integration-cpk-test-watchOS:
6971
timeout-minutes: 60
@@ -93,3 +95,4 @@ jobs:
9395
destination: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=latest
9496
sdk: watchsimulator
9597
xcode_path: '/Applications/Xcode_14.3.app'
98+
other_flags: '-test-iterations 3 -retry-tests-on-failure'

.github/workflows/integ_test_datastore_lazy_load.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
scheme: AWSDataStorePluginLazyLoadTests
3636
destination: 'platform=iOS Simulator,name=iPhone 14,OS=16.4'
3737
xcode_path: '/Applications/Xcode_14.3.app'
38+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
3839

3940
datastore-integration-lazy-load-test-tvOS:
4041
timeout-minutes: 60
@@ -64,6 +65,7 @@ jobs:
6465
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=latest
6566
sdk: appletvsimulator
6667
xcode_path: '/Applications/Xcode_14.3.app'
68+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
6769

6870
datastore-integration-lazy-load-test-watchOS:
6971
timeout-minutes: 60
@@ -93,3 +95,4 @@ jobs:
9395
destination: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=latest
9496
sdk: watchsimulator
9597
xcode_path: '/Applications/Xcode_14.3.app'
98+
other_flags: '-test-iterations 3 -retry-tests-on-failure'

.github/workflows/integ_test_datastore_multi_auth.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
scheme: AWSDataStorePluginMultiAuthTests
3636
destination: 'platform=iOS Simulator,name=iPhone 14,OS=16.4'
3737
xcode_path: '/Applications/Xcode_14.3.app'
38+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
3839

3940
datastore-integration-multi-auth-test-tvOS:
4041
timeout-minutes: 60
@@ -64,6 +65,7 @@ jobs:
6465
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=latest
6566
sdk: appletvsimulator
6667
xcode_path: '/Applications/Xcode_14.3.app'
68+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
6769

6870
datastore-integration-multi-auth-test-watchOS:
6971
timeout-minutes: 60
@@ -93,3 +95,4 @@ jobs:
9395
destination: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=latest
9496
sdk: watchsimulator
9597
xcode_path: '/Applications/Xcode_14.3.app'
98+
other_flags: '-test-iterations 3 -retry-tests-on-failure'

.github/workflows/integ_test_datastore_v2.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
scheme: AWSDataStorePluginV2Tests
3636
destination: 'platform=iOS Simulator,name=iPhone 14,OS=16.4'
3737
xcode_path: '/Applications/Xcode_14.3.app'
38+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
3839

3940
datastore-integration-v2-test-tvOS:
4041
timeout-minutes: 60
@@ -64,6 +65,7 @@ jobs:
6465
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=latest
6566
sdk: appletvsimulator
6667
xcode_path: '/Applications/Xcode_14.3.app'
68+
other_flags: '-test-iterations 3 -retry-tests-on-failure'
6769

6870
datastore-integration-v2-test-watchOS:
6971
timeout-minutes: 60
@@ -93,3 +95,4 @@ jobs:
9395
destination: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=latest
9496
sdk: watchsimulator
9597
xcode_path: '/Applications/Xcode_14.3.app'
98+
other_flags: '-test-iterations 3 -retry-tests-on-failure'

Amplify/Categories/DataStore/Model/Lazy/List+Model.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ public class List<ModelType: Model>: Collection, Codable, ExpressibleByArrayLite
2626

2727
/// The current state of lazily loaded list
2828
var loadedState: LoadedState
29+
30+
/// Boolean property to check if list is loaded
31+
public var isLoaded: Bool {
32+
if case .loaded = loadedState {
33+
return true
34+
}
35+
36+
return false
37+
}
2938

3039
/// The provider for fulfilling list behaviors
3140
let listProvider: AnyModelListProvider<Element>
@@ -61,6 +70,7 @@ public class List<ModelType: Model>: Collection, Codable, ExpressibleByArrayLite
6170
}
6271
}
6372

73+
6474
// MARK: - Initializers
6575

6676
public init(listProvider: AnyModelListProvider<ModelType>) {

AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Core/ListTests.swift

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
import Combine
99
import XCTest
1010

11-
@testable import Amplify
12-
@testable import AmplifyTestCommon
13-
@testable import AWSDataStorePlugin
11+
import Amplify
12+
import AmplifyTestCommon
13+
import AWSDataStorePlugin
1414

1515
class ListTests: BaseDataStoreTests {
1616

@@ -25,15 +25,9 @@ class ListTests: BaseDataStoreTests {
2525
let postId = preparePostDataForTest()
2626

2727
func checkComments(_ comments: List<Comment>) async throws {
28-
guard case .notLoaded = comments.loadedState else {
29-
XCTFail("Should not be loaded")
30-
return
31-
}
28+
XCTAssertFalse(comments.isLoaded)
3229
try await comments.fetch()
33-
guard case .loaded = comments.loadedState else {
34-
XCTFail("Should be loaded")
35-
return
36-
}
30+
XCTAssertTrue(comments.isLoaded)
3731
XCTAssertEqual(comments.count, 2)
3832
expect.fulfill()
3933
}

AmplifyPlugins/DataStore/Tests/DataStoreHostApp/AWSDataStorePluginAuthCognitoTests/AWSDataStoreCategoryPluginAuthIntegrationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class AWSDataStoreCategoryPluginAuthIntegrationTests: AWSDataStoreAuthBaseTest {
6060

6161
try await signIn(user: user1)
6262

63-
await fulfillment(of: [syncReceivedInvoked], timeout: TestCommonConstants.networkTimeout)
63+
await fulfillment(of: [syncReceivedInvoked], timeout: 60)
6464
Amplify.Hub.removeListener(syncReceivedListener)
6565
guard let remoteTodo = remoteTodoOptional else {
6666
XCTFail("Should have received a SyncReceived event with the remote note reconciled to local store")

0 commit comments

Comments
 (0)