Bug#840664: ruby-faker: FTBFS randomly (failing tests)
On Mon, 31 Oct 2016 13:06:09 +0100 (CET) Santiago Vila wrote: what's wrong while trying. > > Stupid question: Should this really be [^.].+\. or maybe [^.]+\. ? I'm not good with ruby either, ccing Balu. Also asking upstream for help https://github.com/stympy/faker/issues/737 signature.asc Description: OpenPGP digital signature
Bug#840664: ruby-faker: FTBFS randomly (failing tests)
I said: > Try generating a lot of random emails and stop at the first one that > does not meet the above assert (and then print the generated email address). Something like this: #!/usr/bin/ruby require 'faker' while true do email = Faker::Internet.email if not email.match(/.+@[^.].+\.\w+/) printf("%s\n", email) end end [ Sorry if that's not good style, I don't know ruby at all ]. Unfortunately, I have been running this for a while without any result. A better strategy would be probably to analyze the code and try to prove that it "must" work (in Knuth style). Since we do know that it does not always work, we should fail at proving that, and discover what's wrong while trying. Stupid question: Should this really be [^.].+\. or maybe [^.]+\. ? Thanks.
Bug#840664: ruby-faker: FTBFS randomly (failing tests)
On Mon, Oct 31, 2016 at 04:40:33PM +0530, Pirate Praveen wrote: > Control: tags -1 pending > > On Thu, 13 Oct 2016 18:08:12 +0200 (CEST) Santiago Vila > wrote: > > At least the following tests seem to be wrongly designed: > > > > => 14: assert Faker::Internet.email.match(/.+@[^.].+\.\w+/) > > I don't see a reason for this to fail randomly. Try generating a lot of random emails and stop at the first one that does not meet the above assert (and then print the generated email address). Then you will see why the email addresses are not generated correctly, or else why the test is wrong. I did something like that here in python: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838828 but I'm not fluent enough in ruby. [ Please Cc: me on bug reports, I'm reading this by chance ]. Thanks.
Bug#840664: ruby-faker: FTBFS randomly (failing tests)
Control: tags -1 pending On Thu, 13 Oct 2016 18:08:12 +0200 (CEST) Santiago Vila wrote: > At least the following tests seem to be wrongly designed: > > => 14: assert Faker::Internet.email.match(/.+@[^.].+\.\w+/) I don't see a reason for this to fail randomly. > => 70: assert period_range.include?(result.hour.to_i), > "\"#{result.hour}\" expected to be included in > Faker::Time::TIME_RANGES[:#{period}] range" This test is updated in 1.6.6 (I hope it fixes the issue) signature.asc Description: OpenPGP digital signature
Bug#840664: ruby-faker: FTBFS randomly (failing tests)
Package: src:ruby-faker Version: 1.5.0-1 Severity: serious Dear maintainer: I tried to build this package in stretch with "dpkg-buildpackage -A" (which is what the "Arch: all" autobuilder would do to build it) but it failed. The package builds ok, but then the tests fail randomly, because they are not designed to never fail (as they should). At least the following tests seem to be wrongly designed: => 14: assert Faker::Internet.email.match(/.+@[^.].+\.\w+/) => 70: assert period_range.include?(result.hour.to_i), "\"#{result.hour}\" expected to be included in Faker::Time::TIME_RANGES[:#{period}] range" so I suggest that they are just disabled. I'm attaching 9 different build logs. Sorry, I can't provide a way to "reproduce" this because the failures are random, but if you look at the build logs and look at the code, maybe you could tell why they fail without having to build this package yourself a lot of times. Thanks. ruby-faker_1.5.0-1_amd64-20161012T212217Z.gz Description: application/gzip ruby-faker_1.5.0-1_amd64-20161012T213114Z.gz Description: application/gzip ruby-faker_1.5.0-1_amd64-20161012T213145Z.gz Description: application/gzip ruby-faker_1.5.0-1_amd64-20161012T213155Z.gz Description: application/gzip ruby-faker_1.5.0-1_amd64-20161013T153231Z.gz Description: application/gzip ruby-faker_1.5.0-1_amd64-20161013T153254Z.gz Description: application/gzip ruby-faker_1.5.0-1_amd64-20161013T153256Z.gz Description: application/gzip ruby-faker_1.5.0-1_amd64-20161013T153315Z.gz Description: application/gzip ruby-faker_1.5.0-1_amd64-20161013T153320Z.gz Description: application/gzip