You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A number of the test fixtures that generate data are powered by os.urandom. This works fine until it generates a random sequence of bytes that starts with a leading zero. This will cause tests to fail during duration due to int.bit_length stripping leading zeros in its computation.
All of the above is a side-effect of the fact that there is no validation logic for the timestamp portion of a ULID. It should never contain a zero leading byte since the minimum value is the Unix epoch.
Items to address this issue:
Validation rules to enforce minimum and maximum timestamp values upon creation
Update test fixtures to specific generates values within valid or invalid ranges
A number of the test fixtures that generate data are powered by
os.urandom
. This works fine until it generates a random sequence of bytes that starts with a leading zero. This will cause tests to fail during duration due to int.bit_length stripping leading zeros in its computation.Example test failure: https://travis-ci.org/ahawker/ulid/jobs/294263189
All of the above is a side-effect of the fact that there is no validation logic for the
timestamp
portion of aULID
. It should never contain a zero leading byte since the minimum value is the Unix epoch.Items to address this issue:
timestamp
values upon creationExample:
The text was updated successfully, but these errors were encountered: