Hi Evgeny,

I would suggest a patch which changes timeouts unconditionally. The
reason is that there are other slow architectures in Debian (mips64el
for example), so increasing timeouts may benefit them too. On the
other hand, increasing these timeouts is harmless for fast
architectures, since they are used as fallbacks only, to indicate
failed tests.

Also, I've tried to build elixir-lang on ricci.debian.org (riscv64
Debian porterbox), and it appears even slower than buildd boxes, so
I've increased another bunch of timeouts.

If it's okay for you I can do NMU for these changes. I can also offer
myself as a co-maintainer/uploader.

Cheers!
-- 
Sergei Golovan
Author: Bo YU <tsu.y...@gmail.com>, Sergei Golovan <sgolo...@debian.org>
Description: Patch increases timeouts in elixir tests.
Last-Modified: Fri, 31 Jan 2025 16:15:17 +0300
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1093147

--- a/lib/elixir/test/elixir/kernel_test.exs
+++ b/lib/elixir/test/elixir/kernel_test.exs
@@ -478,6 +478,7 @@
   end
 
   describe "in/2" do
+    @tag timeout: 180_000
     test "too large list in guards" do
       defmodule TooLargeList do
         @list Enum.map(1..1024, & &1)
--- a/lib/elixir/test/elixir/base_test.exs
+++ b/lib/elixir/test/elixir/base_test.exs
@@ -780,6 +780,7 @@
     assert "fo" == hex_decode32!("cPNg", case: :mixed, padding: false)
   end
 
+  @tag timeout: 120_000
   test "encode then decode is identity" do
     for {encode, decode} <- [
           {&encode16/2, &decode16!/2},
--- a/lib/mix/test/mix/tasks/compile_test.exs
+++ b/lib/mix/test/mix/tasks/compile_test.exs
@@ -354,7 +354,7 @@
   end
 
   test "listening to concurrent compilations" do
-    timeout = 2_000
+    timeout = 8_000
 
     Mix.Project.pop()
 
--- a/lib/mix/test/mix/tasks/test_test.exs
+++ b/lib/mix/test/mix/tasks/test_test.exs
@@ -287,6 +287,7 @@
     end
 
     @tag :unix
+    @tag timeout: 120_000
     test "does not exit on compilation failure" do
       in_fixture("test_stale", fn ->
         File.write!("lib/b.ex", """
@@ -635,9 +636,9 @@
           receive_until_match(port, expected, acc)
         end
     after
-      15_000 ->
+      45_000 ->
         raise """
-        nothing received from port after 15s.
+        nothing received from port after 45s.
         Expected: #{inspect(expected)}
         Got: #{inspect(acc)}
         """
--- a/lib/mix/test/mix/tasks/release_test.exs
+++ b/lib/mix/test/mix/tasks/release_test.exs
@@ -713,6 +713,7 @@
   end
 
   @tag :unix
+  @tag timeout: 120_000
   test "runs in daemon mode" do
     in_fixture("release_test", fn ->
       config = [releases: [permanent2: [include_erts: false, cookie: "abcdefghij"]]]
--- a/lib/ex_unit/mix.exs
+++ b/lib/ex_unit/mix.exs
@@ -18,7 +18,7 @@
         # max_cases: System.schedulers_online * 2,
         # seed: rand(),
 
-        assert_receive_timeout: 100,
+        assert_receive_timeout: 600,
         autorun: true,
         capture_log: false,
         colors: [],

Reply via email to