             expectation.fulfill()
         }
         inputItems.asyncCompactMap(asyncItemTransformer, completion: completionHandler)
-        wait(for:[expectation], timeout: 4, enforceOrder: true)
+        wait(for:[expectation], timeout: 5, enforceOrder: true)
     }
 
     func testAsyncForEachPerformsBlockForEachItem() {

        
        let asyncItemTransformer = { (item: String, completion: @escaping (String?) -> Void) in
            // fake out a process which takes 'item' and asynchronously gets a result for it
            DispatchQueue.global(qos: .default).asyncAfter(deadline: .now() + .seconds(Int.random(in: 0 ... 3))) { // use random delay to ensure results map to correct items even if results are received out of (collection) order
                guard item != "MAP_TO_NIL" else { // fake out getting nil for some items
                    completion(nil)
                    return

            expectation.fulfill()
        }
        inputItems.asyncMap(asyncItemTransformer, completion: completionHandler)
        wait(for:[expectation], timeout: 5, enforceOrder: true)
    }

    func testAsyncCompactMapResultsAreMappedToCorrectItemsEvenIfReceivedOutOfOrder() {
