# gpui: Make property tests deterministic by default \(\#54004\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/ebf2f56a25c75041e5d98e84b859bd08b405033a)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: ebf2f56a25c75041e5d98e84b859bd08b405033a

Requested commit: ebf2f56a25c75041e5d98e84b859bd08b405033a

Commit: ebf2f56a25c75041e5d98e84b859bd08b405033a

Tree: f5a508a482fdf2c513c0604e698620bcb4095c0a

Author: Anthony Eid

Committer: GitHub

## Message

```
gpui: Make property tests deterministic by default (#54004)

### Summary

`#[gpui::property_test]` was non-deterministic because it always used a
random seed with proptest. So it generated different test cases and
scheduler seeds on every run, causing flaky failures. `#[gpui::test]`
doesn't have this problem because it defaults to fixed seeds.

This changes `#[gpui::property_test]` to match: proptest's RNG seed now
defaults to `0` instead of random, so the same cases run every time.
The`$SEED` env var overrides both the scheduler seed and case generation
seed.

Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A or Added/Fixed/Improved ...

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
```

## Parents

- [7d365ef26c5992007756d8b4a20686b7d0e1dc37](https://git.cafe/gitcafe/zed/commit/7d365ef26c5992007756d8b4a20686b7d0e1dc37?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/ebf2f56a25c75041e5d98e84b859bd08b405033a?format=markdown)
