-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Uniqueness test for UUID #415
base: main
Are you sure you want to change the base?
Conversation
@iCharlesHu: Please review. |
@swift-ci test |
Can I get some background on why this test was added? |
@swift-ci test |
Hello @parkera Currently we have test cases for UUID are:
And In swift foundation library, Its defined as These defined test cases doesn't validate the Hence added Open for your thoughts as well. Thanks |
Hello @parkera Waiting for your review. Thanks. |
It is of course impossible to test that it is always "universally unique" - so is, then, the purpose of this test to validate that we don't have a very basic error of always generating the same UUID 10,000 times in a row? With the current construction of the test case, isn't it true that if we generate the same uuid 9,999 times and then 1 different it will pass? Is that a useful test case? |
Hello @parkera
Lets say pipeline run in a day is 24 times (Assuming 1 hr per pipeline execution) I.e Constant Time And Lifetime of this framework is so each test cases in pipeline will be executed till the life time will be
Taking one random test,
say
But in UUID we don’t have pre-defined values of test. Since its universally unique and will produce unique value every time. To validate this we have agreed by definition that its universally uniques. So we can have checks till the life time of this framework that it will pass this and if it fails once, definition is no longer valid.
In UUID, Even if its fails once, its a failure. But I can have Thanks :) |
I'm not sold on the idea of non-deterministic testing to catch failures. We will often dismiss one-off failures as some kind of external factor rather than a failure of the code under test. |
This reasoning hold true to me for general testing. UUID(In contrary) cannot be tested with the same reasoning.
Thanks you in advance. :) |
We tried to add Uniqueness test for UUID.