Avoid possible timeout errors in TestBugReporter#test_bug_reporter_add.

This commit is contained in:
Vít Ondruch 2020-07-27 17:16:51 +02:00
commit 60c64f1945
2 changed files with 42 additions and 1 deletions

View file

@ -0,0 +1,34 @@
From 9b42fce32bff25e0569581f76f532b9d57865aef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Mon, 27 Jul 2020 14:56:05 +0200
Subject: [PATCH] Timeout the test_bug_reporter_add witout raising error.
While timeouting the threads might be still good idea, it does not seems
the timeout impacts the TestBugReporter#test_bug_reporter_add result,
because the output of the child process has been already collected
earlier.
It seems that when the system is under heavy load, the thread might not
be sheduled to finish its processing. Even finishing the child process
might take tens of seconds and therefore the test case finish might take
a while.
---
test/-ext-/bug_reporter/test_bug_reporter.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/-ext-/bug_reporter/test_bug_reporter.rb b/test/-ext-/bug_reporter/test_bug_reporter.rb
index 628fcd0340..2c677cc8a7 100644
--- a/test/-ext-/bug_reporter/test_bug_reporter.rb
+++ b/test/-ext-/bug_reporter/test_bug_reporter.rb
@@ -21,7 +21,7 @@ def test_bug_reporter_add
args = ["--disable-gems", "-r-test-/bug_reporter",
"-C", tmpdir]
stdin = "register_sample_bug_reporter(12345); Process.kill :SEGV, $$"
- assert_in_out_err(args, stdin, [], expected_stderr, encoding: "ASCII-8BIT")
+ assert_in_out_err(args, stdin, [], expected_stderr, encoding: "ASCII-8BIT", timeout_error: nil)
ensure
FileUtils.rm_rf(tmpdir) if tmpdir
end
--
2.27.0

View file

@ -22,7 +22,7 @@
%endif
%global release 132
%global release 133
%{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
# The RubyGems library has to stay out of Ruby directory tree, since the
@ -161,6 +161,9 @@ Patch16: rubygems-3.1.3-Improve-require.patch
Patch17: rubygems-3.1.3-Revert-Exclude-empty-suffix-from-I-require-loop.patch
# https://github.com/rubygems/rubygems/pull/3639
Patch18: rubygems-3.1.3-Fix-correctness-and-performance-regression-in-require.patch
# Avoid possible timeout errors in TestBugReporter#test_bug_reporter_add.
# https://bugs.ruby-lang.org/issues/16492
Patch19: ruby-2.7.1-Timeout-the-test_bug_reporter_add-witout-raising-err.patch
# Add support for .include directive used by OpenSSL config files.
# https://github.com/ruby/openssl/pull/216
@ -579,6 +582,7 @@ rm -rf ext/fiddle/libffi*
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch22 -p1
# Provide an example of usage of the tapset:
@ -1277,6 +1281,9 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS"
%changelog
* Mon Jul 27 2020 Vít Ondruch <vondruch@redhat.com> - 2.7.1-133
- Avoid possible timeout errors in TestBugReporter#test_bug_reporter_add.
* Wed Jun 24 2020 Jun Aruga <jaruga@redhat.com> - 2.7.1-132
- Add ruby-default-gems dependency on irb.
Resolves: rhbz#1850541