<commit_before>package org.http4s
package server
package middleware

import java.util.concurrent.atomic.AtomicBoolean

import cats.effect._
import cats.implicits._
import fs2.Scheduler
import org.http4s.Http4sSpec._
import org.http4s.dsl.io._

import scala.concurrent.duration._

class TimeoutSpec extends Http4sSpec {

  val myService = HttpService[IO] {
    case _ -> Root / "fast" =>
      Ok("Fast")
    case _ -> Root / "slow" =>
      delay(2.seconds, Ok("Slow"))
  }

  val timeoutService = Timeout(1.nanosecond)(myService)

  val fastReq = Request[IO](GET, uri("/fast"))
  val slowReq = Request[IO](GET, uri("/slow"))

  "Timeout Middleware" should {<commit_msg>Increase timeout in timeout spec by a factor 5000<commit_after>package org.http4s
package server
package middleware

import java.util.concurrent.atomic.AtomicBoolean

import cats.effect._
import cats.implicits._
import fs2.Scheduler
import org.http4s.Http4sSpec._
import org.http4s.dsl.io._

import scala.concurrent.duration._

class TimeoutSpec extends Http4sSpec {

  val myService = HttpService[IO] {
    case _ -> Root / "fast" =>
      Ok("Fast")
    case _ -> Root / "slow" =>
      delay(2.seconds, Ok("Slow"))
  }

  val timeoutService = Timeout(5.milliseconds)(myService)

  val fastReq = Request[IO](GET, uri("/fast"))
  val slowReq = Request[IO](GET, uri("/slow"))

  "Timeout Middleware" should {
{'fraction_non_alphanumeric': 0.12481857764876633, 'fraction_numerical': 0.01451378809869376, 'mean_word_length': 4.014545454545455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4264860', 'n_tokens_mistral': 466, 'n_tokens_neox': 445, 'n_words': 108}