aboutsummaryrefslogtreecommitdiffstats
path: root/test/drb
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans2019-11-181-9/+0
| | | | | | This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby.
* Fix DRbServer#any_to_sJeremy Evans2019-10-161-0/+14
| | | | | | | | My previous fix in d0ed935d5bf8c3fce9800742a36e44fb7f63dda4 was not correct, as pointed out by cremno on GitHub. This simplifies things by just using Kernel#to_s. Also switch to bind_call(obj) instead of bind(obj).call for better performance.
* Do not raise an exception on a closed DRb socketJeremy Evans2019-10-161-0/+15
| | | | | | | | | This rescues some exceptions that could happen with a closed or shutdown DRb socket. This can prevent the server from exiting if an client socket is closed directly after it is accepted. Fixes [Bug #8039]
* Fix some DRb issues (#2552)Jeremy Evans2019-10-142-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handle BasicObject in drb Also fix a bug in rescue clause of any_to_s because sprintf does not handle the %l modifier. Fixes [Bug #7833] * Do not send a reply to the client if there is a connection error This allows for normal TCP shutdown (fin-ack-fin-ack instead of fin-ack-push-rst). Patch from pierre@mouraf.org (Pierre-Alexandre Meyer). Fixes [Bug #2339] * Detect fork and do not reuse forked connections in drb This associates each DRbConn with a pid, and if the pid changes, it closes any DRbConns in the pool with a pid that no longer matches. This fixes DRb servers from sending messages intended for one client to another client after forking. Fixes [Bug #2718] Fixes [Bug #14471]
* test/drb/drbtest.rb: Skip test_06_timeout on Solaris10sYusuke Endoh2019-09-021-6/+9
| | | | | | | | | | The test seems to have a race condition, which fails on very slow machine like Solaris10s. So skip it. In addition, this change restores timeout guard that was removed at 0660d7cb538cf5284d50f66adfcbd78609839715. This is because the test gets stuck forever when something wrong occurs. It is better to fail the test than stuck.
* test/drb/drbtest.rb: Use EnvUtil.timeout for timeout scale factorYusuke Endoh2019-09-011-1/+1
|
* Revert "Revert "Revert "Skip BUGs on Solaris"""Yusuke Endoh2019-09-012-3/+1
| | | | | | | This reverts commit 3be3948870f6589343c4aecb541e22fae7751b47. The Solaris environment couldn't lookup the hostname itself by a wrong setting. Now it is fixed, so try again.
* Revert "Revert "Skip BUGs on Solaris""Yusuke Endoh2019-09-012-1/+3
| | | | | | | This reverts commit 84dca8eff0cbcb1c23623b47fb78b0daf5c76e35. "exceution expired" occurred on Solaris. https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190901T072504Z.fail.html.gz
* Revert "Skip BUGs on Solaris"Yusuke Endoh2019-09-012-3/+1
| | | | | | | This reverts commit 8adefd4cf29288f6e43f20efbdd44b215ae16c7a. I couldn't see any failure on Solaris if the guard is removed. Give it a try.
* ignore test_RangeErrorMasatoshi SEKI2019-05-041-8/+0
|
* add DRb::WeakIdConv (Bug #15711)Masatoshi SEKI2019-05-041-0/+17
|
* add DRbObject dereference test (Preparation for investigation of Bug #15711)Masatoshi SEKI2019-04-251-0/+47
|
* Just skip on armv7l-linuxnaruse2018-11-031-8/+7
| | | | | | | it seems ssl.close doesn't cause EOFError on client side, but just skip because it breaks test-all. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add timeoutnaruse2018-11-021-6/+8
| | | | | | it breaks armv7 CI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Skip BUGs on Solariskazu2018-10-232-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add debug option to check ci failures on solariskazu2018-10-221-0/+3
| | | | | | | | | | | failed to start extserv?: - https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20181020T132506Z.fail.html.gz BUG in sysread of OpenSSL: - https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20181020T132408Z.fail.html.gz - https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20181020T131807Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Run background threads while testing drbkazu2018-10-204-124/+107
| | | | | | | Do not start background thread on load test/drb/drbtest.rb, and stop threads on each test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* drb: use \A and \znobu2017-12-301-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix r60271kazu2017-10-211-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add a new test case for ipaddr 1.2.0 + drb/aclknu2017-10-211-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Make ACL::ACLEntry not suppress IPAddr::InvalidPrefixErrorknu2017-10-211-6/+12
| | | | | | | This is because it would be a user error because a pattern containing a slash shouldn't be a host name pattern but an IP address pattern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove unused test files related `$SAFE>=2`kazu2017-10-093-87/+1
| | | | | | unused since r14024 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_drb.rb: removed extra spacesnobu2017-09-261-3/+3
| | | | | | | | * test/drb/test_drb.rb (TestDRbLarge#test_02_large_ary): removed unnecessary extra spaces which make the following parentheses an expression. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use dedicated assertionsnobu2017-04-073-56/+55
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* openssl: adapt OpenSSL::PKey to OpenSSL 1.1.0 opaque structsrhe2016-06-052-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * ext/openssl/openssl_missing.[ch]: Implement EVP_PKEY_get0_*() and {RSA,DSA,EC_KEY,DH}_get0_*() functions. OpenSSL 1.1.0 makes EVP_PKEY/RSA/DSA/DH opaque. We used to provide setter methods for each parameter of each PKey type, for example PKey::RSA#e=, but this is no longer possible because the new API RSA_set0_key() requires the 'n' at the same time. This commit adds deprecation warning to them and adds PKey::*#set_* methods as direct wrapper for those new APIs. For example, 'rsa.e = 3' now needs to be rewritten as 'rsa.set_key(rsa.n, 3, rsa.d)'. [ruby-core:75225] [Feature #12324] * ext/openssl/ossl_pkey*.[ch]: Use the new accessor functions. Implement RSA#set_{key,factors,crt_params}, DSA#set_{key,pqg}, DH#set_{key,pqg}. Emit a warning with rb_warning() when old setter methods are used. * test/drb/ut_array_drbssl.rb, test/drb/ut_drb_drbssl.rb, test/rubygems/test_gem_remote_fetcher.rb: Don't set a priv_key for DH object that are used in tmp_dh_callback. Generating a new key pair every time should be fine - actually the private exponent is ignored in OpenSSL >= 1.0.2f/1.0.1r even if we explicitly set. https://www.openssl.org/news/secadv/20160128.txt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use finalizer trick instead of thread.seki2016-05-221-3/+39
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* don't use keeper thread. [Bug #12342]seki2016-05-151-43/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* drbtest.rb: make command an arraynobu2016-02-121-4/+3
| | | | | | | * test/drb/drbtest.rb (DRbService): make @@ruby an array to be consistent with r35424. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* additional math operationsnobu2016-01-312-4/+64
| | | | | | | * test/drb/ut_large.rb (multiply, avg, median): add additional math operations to DRbLarge. [Fix GH-1086] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-1618-0/+18
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/drb/test_drb.rb: Run Rinda/DRb tests on localhost. [Fix GH-1027]seki2015-09-211-1/+1
| | | | | | | | | | patch by voxik. * test/rinda/test_rinda.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use Timeout.timeoutnobu2015-07-132-2/+2
| | | | | | | * time: Object#timeout has been deprecated a long time ago, use Timeout.timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* drbtest.rb: refactornobu2015-02-121-28/+23
| | | | | | | * test/drb/drbtest.rb (test_07_public_private_protected_missing): refactor by splitting and using assert_raise. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: Moved from test/ruby/.akr2014-11-131-1/+0
| | | | | | | | | | | | | | * test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* normalize reference to Timeout::Errornormal2014-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | From: John Bachir <j@jjb.cc> * bootstraptest/test_io.rb (assert_finish): normalize rescue for Timeout::Error * lib/net/ftp.rb (Net#read_timeout): ditto for doc * lib/resolv.rb (Resolv::ResolvTimeout): ditto for subclass * lib/webrick/httprequest.rb (_read_data): ditto for rescue * sample/timeout.rb (p timeout): ditto for call * test/drb/drbtest.rb (test_06_timeout): ditto * test/ruby/test_readpartial.rb (test_open_pipe): ditto * test/thread/test_queue.rb (test_queue_thread_raise): ditto * thread.c (rb_thread_s_handle_interrupt): ditto for doc [ruby-core:65481] [misc #10339] TimeoutError is a legacy constant, Timeout::Error is the canonical constant. This patch normalizes all code and comments to reference Timeout::Error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Join threads.akr2014-06-024-4/+53
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/drb: Wrap tests definitions by DRbTests module. This makesakr2014-06-0114-16/+66
| | | | | | | | | several tests (ACLEntryTest, TestBug4409, etc.) easier to understand that they are tests for DRb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* drbtest.rb: avoid leaking threadsnobu2014-05-281-0/+4
| | | | | | | * test/drb/drbtest.rb (test_06_timeout): clean up worker threads to avoid leaking threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* explicitly stop DRb::ExtServnaruse2014-02-0710-10/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warnings: assigned but unused variable - esnaruse2014-02-0610-10/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/drb/ut_eq.rb: Use localhost for drb tests [Bug #7311]zzak2013-07-113-3/+3
| | | | | | | | | Patch by Vit Ondruch [ruby-core:49101] * test/drb/ut_array.rb: ditto * test/drb/ut_array_drbssl.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* drbtest.rb: DRbBasenobu2013-06-195-84/+45
| | | | | | | * test/drb/drbtest.rb (DRbBase): extract from DRbCore and DRbAry for setup_service and teardown. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/drb/drbtest.rb (Drb{Core,Ary}#teardown): retry Process.killusa2013-04-111-6/+20
| | | | | | | | if it fails with Errno::EPERM on Windows (workaround). [ruby-dev:47245] [Bug #8251] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove very obsolete test codemarcandre2013-03-081-5/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* drbtest.rb: use :KILL on Windowsshirosaki2012-09-291-2/+2
| | | | | | | | | | | * test/drb/drbtest.rb (DRbCore#teardown): Use Process.kill :KILL on Windows because Process.kill :INT silently fails on Windows 7 and raises EINVAL on Windows XP for spawned process with new_pgroup: false. * test/drb/drbtest.rb (DRbAry#teardown): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/drb/ssl.rb (DRb::DRbSSLSocket::SSLConfig::DEFAULT): addnaruse2012-09-202-1/+23
| | | | | | | | | | | | SSLTmpDhCallback for configuration option. * lib/drb/ssl.rb (setup_ssl_context): copy the value of tmp_dh_callback. * test/drb/ut_array_drbssl.rb: set tmp_dh_callback to suppress warning. * test/drb/ut_drb_drbssl.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check @there if it is nil to prevent infinite loopnaruse2012-09-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/drb/ut_drb.rb: revert a part of r36987, and get rid of a warningusa2012-09-201-1/+2
| | | | | | | | with another method. if the substitution is removed, the ExtSrv object will be GC'ed and some tests will be blocked. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warningsnaruse2012-09-191-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove trainling spaces.nobu2012-08-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e