It seems there is an error when creating the test. If you run the composer test ./tests/Policies/ThreadPolicyTest.php - the result is correct
EDIT: Yes. The test is written incorrectly. If you restart it multiple times, the error disappears periodically. Depends on the row from the DB
Originally posted by @neznaika0 in #390 (comment)