     d[cancel2].cancel(String(cancel2))
 
     let c = reduce(d, initial: 0, combine: { a, b in return a+b })
-    let x = expectation(description: "reduced")
-    c.notify { _ in x.fulfill() }
+
+    waitForExpectations(timeout: 1.0)
 
     XCTAssert(c.value == nil)
     XCTAssert(c.error as? DeferredError == DeferredError.canceled(String(min(cancel1, cancel2))))
-
-    waitForExpectations(timeout: 1.0)
   }
 
   func testCombineArray1()


    let d = Deferred.inParallel(count: count) {
      i -> Int in
      usleep(numericCast((i+1)*10_000))
      e[i].fulfill()
      return i
    }

      i -> Deferred<Int> in
      let e = expectation(description: i.description)
      return Deferred {
        usleep(numericCast(i+1)*10_000)
        e.fulfill()
        return i
      }
