Closed
Bug 651015
Opened 15 years ago
Closed 8 years ago
Add unique-number-generator to SimpleTest
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: sicking, Assigned: ehsan.akhgari)
Details
It'd be nice to have a way for tests to in a non-error-prone way get unique numbers. Some nice-to-haves are:
1. Make the numbers unique when the test harness runs multiple tests. This could
help prevent cached data from a previous test from interfering with a
subsequent test.
2. Make numbers generated for the same test run manually multiple times be
unique. Again this prevents previous runs of the same test from interfering
with new runs.
We could use this API in at least browser_590268.js and test_CrossSiteXHR_cache.html
| Reporter | ||
Updated•15 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Comment 1•15 years ago
|
||
Ideally this wouldn't produce random output, but a repeatable sequence, so as to avoid introducing another source of randomness into the tests.
| Assignee | ||
Comment 2•15 years ago
|
||
(In reply to comment #1)
> Ideally this wouldn't produce random output, but a repeatable sequence, so as
> to avoid introducing another source of randomness into the tests.
Hmm, you mean something like a hash of the file path + a monotonically increasing number? (Can we even compute hashes in js?)
Comment 3•15 years ago
|
||
For the purposes described here, wouldn't an incrementing counter serve the purpose?
| Assignee | ||
Comment 4•15 years ago
|
||
(In reply to comment #3)
> For the purposes described here, wouldn't an incrementing counter serve the
> purpose?
That wouldn't give us the same values for a given test if the test is run multiple times, right?
Comment 5•15 years ago
|
||
(In reply to comment #0)
> 2. Make numbers generated for the same test run manually multiple times be
> unique. Again this prevents previous runs of the same test from interfering
> with new runs.
sicking explicitly said that was what he wanted.
Comment 6•8 years ago
|
||
Mass closing mochitest bugs that haven't had activity in the past 5 years. Please re-open or file a new bug with modern context if this is still relevant.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•