# Keeping timeouts active while tracing tests

A test can stop timing out when you rerun it with `--trace`:

```elixir
@tag timeout: 10
test "slow work" do
  Process.sleep(50)
  assert true
end
```

`mix test` fails this test after 10 milliseconds. `mix test --trace` passes it because trace mode sets test timeouts to infinity, not only `max_cases` to 1.

If you only need serial execution while chasing a race, keep the timeout active:

```sh
mix test test/slow_test.exs --max-cases 1
```

Mind you, `--slowest` and `--slowest-modules` enable trace mode too.

https://hexdocs.pm/mix/Mix.Tasks.Test.html#module-command-line-options


---

Created by: almirsarajcic
Date: September 15, 2026
URL: https://elixirdrops.net/d/zBackG2b
