From: Debian Ruby Team <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
Date: Wed, 12 Oct 2022 13:14:46 -0300
Subject: rewrite failing test when building on several architectures

Bug: https://github.com/eventmachine/eventmachine/issues/873
Origin: https://github.com/eventmachine/eventmachine/issues/873#issuecomment-456483112
Last-Update: 2019-01-23

armel, armhf, hppa, mips, mipsel, sparc64
---
 tests/test_ssl_dhparam.rb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/test_ssl_dhparam.rb b/tests/test_ssl_dhparam.rb
index aece10f..feb34cc 100644
--- a/tests/test_ssl_dhparam.rb
+++ b/tests/test_ssl_dhparam.rb
@@ -25,7 +25,13 @@ class TestSSLDhParam < Test::Unit::TestCase
   def test_dhparam_1_2
     omit_if(rbx?)
 
-    client_server client: CLIENT_1_2, server: DH_1_2.merge(dhparam: DH_PARAM_FILE)
+    # a few platforms error due to long test times, default is 3
+    slow_platforms = %w[arm-linux-gnueabi armhf-linux-gnueabi hppa-linux-gnu mips-linux-gnu mipsel-linux-gnu sparc64-linux-gnu]
+    slow = slow_platforms.include?(RUBY_PLATFORM) ? 30 : 3
+
+    client_server client: CLIENT_1_2,
+      server: DH_1_2.merge(dhparam: DH_PARAM_FILE),
+      timeout: slow
 
     assert Client.handshake_completed?
     assert Server.handshake_completed?
