Opened 5 years ago
Last modified 5 months ago
#37371 accepted enhancement
Reduce reliance on randomness in tests
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Future Release | Priority: | lowest |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | needs-patch good-first-bug |
Focuses: | Cc: |
Description
39 of core's tests rely on rand_str()
returning a different value each time it's called in order to pass. It's entirely possible that rand_str()
could return an identical value twice, and therefore the test would randomly (ho ho) fail.
Let's remove all the unnecessary uses of rand_str()
, where a fixed string would suffice. This will also shave off some milliseconds.
Attachments (1)
Change History (16)
#4
@
4 years ago
@johnbillion Do you want to remove the rest of the calls to rand_str
l? If so, good first bug?
#5
@
4 years ago
- Keywords needs-patch good-first-bug added; has-patch removed
- Milestone changed from 4.7 to Future Release
#6
@
4 years ago
- Keywords good-first-bug removed
- Owner set to johnbillion
- Status changed from new to accepted
- Summary changed from Reduce reliance on rand_str() in tests to Reduce reliance on randomness in tests
There's also a bunch of instances of rand()
in tests which are just as unnecessary.
#11
@
17 months ago
- Keywords reporter-feedback added
@johnbillion is there any more work to be done here? Can we wrap this up during 5.4?
#12
@
17 months ago
- Keywords reporter-feedback removed
- Milestone changed from Future Release to 5.4
- Priority changed from normal to low
Note: See
TracTickets for help on using
tickets.
37371.patch replaces all instances of
rand_str()
with static strings where the test will fail ifrand_str()
were to return sequential identical strings.