Project

General

Profile

Actions

Bug #16263

closed

test-all & did_you_mean - intermitent failures ?

Added by MSP-Greg (Greg L) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.0dev (2019-10-18T18:03:54Z master 5c81e19b19) [x64-mingw32]
[ruby-core:95429]

Description

If did_you_mean is loaded, the following test failure may occur:

TestException#test_nomethod_error_new_receiver [/ruby/test/ruby/test_exception.rb:999]:
<["Message", :foo, #Object:0x00000000070f5aa8]> expected but was
<["Message\n" + "Did you mean? for", :foo, #Object:0x00000000070f5aa8]>.

I run test-all parallel with retry, but some CI may not. Without the retry, the above test may intermittently fail.

Also, in test/optparse/test_did_you_mean.rb, there are three tests that use a regex:

Did you mean\?\s+baz\s+bar

I needed to change it to

Did you mean\?\s+bar\s+baz

for the three tests to pass. I've never run into that kind of thing with Windows vs other OS's, so one might wonder if the tests are really running??

See https://github.com/ruby/ruby/blob/5c81e19b196e940b3233781b7ef0c5bfcbdee4f5/test/optparse/test_did_you_mean.rb#L29-L47

Anyway, one could spawn Ruby for the three tests so the loading of did_you_mean is isolated, seems like a lot of work...

Updated by MSP-Greg (Greg L) over 4 years ago

I just noticed that the tests are not running in ruby'S CI, see:

https://github.com/ruby/ruby/runs/266527630#step:17:122

Because ruby-loco is running tests against install (with a few patches), they do run in its CI...

Updated by MSP-Greg (Greg L) over 4 years ago

Fix for the test_exception.rb issue is:

https://github.com/ruby/ruby/pull/2577

Updated by MSP-Greg (Greg L) over 4 years ago

Fix for the test/optparse/test_did_you_mean.rb issue:

https://github.com/ruby/ruby/pull/2581

Actions #4

Updated by nobu (Nobuyoshi Nakada) over 4 years ago

  • Status changed from Open to Closed

Applied in changeset git|27261007eb45adae4d5b30cbafa2ef27a2345b3f.


DidYouMean can be an empty stub module [Bug #16263]

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0