Hey guys, Seems like I found a bug in TestApplica...
# ktor
Hey guys, Seems like I found a bug in TestApplicationEngine
Copy code
    fun hookRequests(
        processRequest: TestApplicationRequest.(setup: TestApplicationRequest.() -> Unit) -> Unit,
        processResponse: TestApplicationCall.() -> Unit,
        block: () -> Unit
    ) {
        val oldProcessRequest = processRequest    /// <<<----------------------- HERE
        val oldProcessResponse = processResponse
        this.processRequest = {
            oldProcessRequest {
there is a clash in names between this.processRequest and function's argument processRequest and it resolved to function's argument. So instead preserving old request processor (and restore later) new processor is stored. I found this behavior with cookieSession {} extention. UPD: ktor 1.2.3 UPD2: Filled a ticket.