amplify-swift icon indicating copy to clipboard operation
amplify-swift copied to clipboard

DataStore testLastMutationSentWhenNoNetwork unit test failure

Open lawmicha opened this issue 3 years ago • 0 comments

Describe the bug

Test Case '-[AWSDataStoreCategoryPluginTests.OutgoingMutationQueueNetworkTests testLastMutationSentWhenNoNetwork]' started.
### DataStore listener 2022-03-08 17:06:32 +0000 - : receive subscription: (PassthroughSubject)
### DataStore listener 2022-03-08 17:06:32 +0000 - : request unlimited
2022-03-08 17:06:32.649745+0000 xctest[3919:18273] [Amplify] Configuring
### DataStore listener 2022-03-08 17:06:32 +0000 - : receive value: (HubPayload(eventName: "DataStore.networkStatus", context: nil, data: Optional(AWSDataStoreCategoryPlugin.NetworkStatusEvent(active: true))))
### DataStore listener 2022-03-08 17:06:32 +0000 - : receive value: (HubPayload(eventName: "DataStore.subscriptionEstablished", context: nil, data: nil))
### DataStore listener 2022-03-08 17:06:32 +0000 - : request max: (1) (synchronous)
2022-03-08 17:06:33.190252+0000 xctest[3919:18455] [RemoteSyncEngine] Successfully finished sync
### DataStore listener 2022-03-08 17:06:32 +0000 - : receive value: (HubPayload(eventName: "DataStore.syncStarted", context: nil, data: nil))
### DataStore listener 2022-03-08 17:06:32 +0000 - : request max: (1) (synchronous)
### DataStore listener 2022-03-08 17:06:32 +0000 - : receive value: (HubPayload(eventName: "DataStore.outboxStatus", context: nil, data: Optional(AWSDataStoreCategoryPlugin.OutboxStatusEvent(isEmpty: true))))
### DataStore listener 2022-03-08 17:06:32 +0000 - : request max: (1) (synchronous)
### DataStore listener 2022-03-08 17:06:32 +0000 - : receive value: (HubPayload(eventName: "DataStore.outboxMutationEnqueued", context: nil, data: Optional(AWSDataStoreCategoryPlugin.OutboxMutationEvent(modelName: "Post", element: AWSDataStoreCategoryPlugin.OutboxMutationEvent.OutboxMutationEventElement(model: AmplifyTestCommon.Post(id: "A0C396AA-20EC-4323-B7C6-1510FE4B4B4A", title: "Test", content: "Newly created", createdAt: Amplify.Temporal.DateTime(foundationDate: 2022-03-08 17:06:32 +0000), updatedAt: nil, draft: nil, rating: nil, status: nil, comments: Optional(Amplify.List<AmplifyTestCommon.Comment>)), version: nil, lastChangedAt: nil, deleted: nil)))))
### DataStore listener 2022-03-08 17:06:32 +0000 - : request max: (1) (synchronous)
### DataStore listener 2022-03-08 17:06:32 +0000 - : receive value: (HubPayload(eventName: "DataStore.outboxStatus", context: nil, data: Optional(AWSDataStoreCategoryPlugin.OutboxStatusEvent(isEmpty: false))))
### DataStore listener 2022-03-08 17:06:32 +0000 - : request max: (1) (synchronous)
### DataStore listener 2022-03-08 17:06:32 +0000 - : receive value: (HubPayload(eventName: "DataStore.outboxMutationProcessed", context: nil, data: Optional(AWSDataStoreCategoryPlugin.OutboxMutationEvent(modelName: "Post", element: AWSDataStoreCategoryPlugin.OutboxMutationEvent.OutboxMutationEventElement(model: AmplifyTestCommon.Post(id: "A0C396AA-20EC-4323-B7C6-1510FE4B4B4A", title: "Test", content: "Newly created", createdAt: Amplify.Temporal.DateTime(foundationDate: 2022-03-08 17:06:32 +0000), updatedAt: nil, draft: nil, rating: nil, status: nil, comments: Optional(Amplify.List<AmplifyTestCommon.Comment>)), version: Optional(1), lastChangedAt: Optional(1646759193), deleted: Optional(false))))))
### DataStore listener 2022-03-08 17:06:32 +0000 - : request max: (1) (synchronous)
### DataStore listener 2022-03-08 17:06:32 +0000 - : receive value: (HubPayload(eventName: "DataStore.networkStatus", context: nil, data: Optional(AWSDataStoreCategoryPlugin.NetworkStatusEvent(active: false))))
### DataStore listener 2022-03-08 17:06:32 +0000 - : receive value: (HubPayload(eventName: "DataStore.outboxStatus", context: nil, data: Optional(AWSDataStoreCategoryPlugin.OutboxStatusEvent(isEmpty: false))))
### DataStore listener 2022-03-08 17:06:32 +0000 - : request max: (1) (synchronous)
2022-03-08 17:06:33.269249+0000 xctest[3919:18919] [OutgoingMutationQueue] Unexpected state transition. In stopping, got processedEvent
2022-03-08 17:06:33.272534+0000 xctest[3919:18468] [OutgoingMutationQueue] Unexpected state transition. In stopped, got doneStopping
2022-03-08 17:06:33.273517+0000 xctest[3919:18468] [RemoteSyncEngine] Unexpected state transition. In schedulingRestart, got cleanedUp
Swift/RangeReplaceableCollection.swift:623: Fatal error: Can't remove first element from an empty collection
2022-03-08 17:06:33.277293+0000 xctest[3919:19273] Swift/RangeReplaceableCollection.swift:623: Fatal error: Can't remove first element from an empty collection
xctest(3953,0x10bb8ee00) malloc: nano zone abandoned due to inability to preallocate reserved vm space.

Restarting after unexpected exit, crash, or test timeout in OutgoingMutationQueueNetworkTests.testLastMutationSentWhenNoNetwork(); summary will include totals from previous launches.

Steps To Reproduce

Run `OutgoingMutationQueueNetworkTests.testLastMutationSentWhenNoNetwork()`

Expected behavior

Consistent test pass

Amplify Framework Version

main

Amplify Categories

DataStore

Dependency manager

Cocoapods

Swift version

N/A

CLI version

N/A

Xcode version

N/A

Relevant log output

No response

Is this a regression?

No

Regression additional context

No response

Device

N.A

iOS Version

N/A

Specific to simulators

No response

Additional context

No response

lawmicha avatar Mar 08 '22 17:03 lawmicha