elastic / elastic/logstash

Core specs behave randomly even with the same seed

Open
#3,751 1 comment 0 reactions 0 assignees View on GitHub
tests-infra upstream fix needed
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

Currently running `bin/rspec spec --seed=2992` multiple times will yield:

```
1077 examples, 0 failures
1327 examples, 0 failures
1150 examples, 0 failures
908 examples, 0 failures
```

This is happens in [unicode_trimmer_spec](https://github.com/elastic/logstash/blob/master/spec/util/unicode_trimmer_spec.rb), because of the [randomized testing spec](https://github.com/elastic/logstash/blob/master/spec/util/unicode_trimmer_spec.rb#L46-L54) that uses `stress_it` from [ruby-flores](https://github.com/jordansissel/ruby-flores/blob/master/lib/flores/rspec/stress.rb#L101-L105)

It seems to be possible to define the number of iterations in Flores so se can seed it with the rspec seed value

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.