 		var returnCount = 0
 		_ = client.requestData(url: requestUrl).subscribe(onNext: { _ in returnCount += 1 }, onCompleted: { exp.fulfill() })
 		
-		waitForExpectations(timeout: 0.01, handler: nil)
+		waitForExpectations(timeout: waitTimeout, handler: nil)
 		
 		XCTAssertEqual(returnCount, 1, "Should return data only once")
 	}

		var returnCount = 0
		_ = client.requestData(url: requestUrl, requestCacheMode: .cacheOnly).subscribe(onNext: { _ in returnCount += 1 }, onCompleted: { exp.fulfill() })
		
		waitForExpectations(timeout: 0.01, handler: nil)
		
		XCTAssertEqual(returnCount, 0, "Should not return data")
	}

import OHHTTPStubs

class HttpClientCachingTests: XCTestCase {
    let waitTimeout = 0.5
	var cacheDirectory: URL!
	var client: HttpClient!
	
