retry(attempts: customAttempts, delay: customDelay) { () -> Promise<Int> in
      defer { startDate = Date() }
      if count <= customAttempts {
        let timeInterval = Date().timeIntervalSince(startDate).rounded()
        XCTAssertGreaterThanOrEqual(timeInterval, customDelay)