Skip to content

Commit d84a637

Browse files
authored
Fixed order of callbacks in Hub Unit test (#221)
1 parent e469b4e commit d84a637

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

AmplifyTests/CategoryTests/Hub/DefaultPluginTests/AutoUnsubscribeHubListenToOperationTests.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,10 @@ class AutoUnsubscribeHubListenToOperationTests: XCTestCase {
151151
return
152152
}
153153

154-
operation.doMockDispatch(event: .completed(StorageListResult(items: [])))
155154
operation.doMockDispatch(event: .inProcess(()))
156-
wait(for: [listenerWasInvokedForInProcess, listenerWasInvokedForCompleted], timeout: 0.5)
155+
wait(for: [listenerWasInvokedForInProcess], timeout: 0.1)
156+
operation.doMockDispatch(event: .completed(StorageListResult(items: [])))
157+
wait(for: [listenerWasInvokedForCompleted], timeout: 0.1)
157158

158159
operation.doMockDispatch(event: .failed(StorageError.accessDenied("", "")))
159160
wait(for: [listenerWasInvokedForFailed], timeout: 0.1)

0 commit comments

Comments
 (0)