]> git.kaiwu.me - njs.git/commit
Test262: fixed flaky fs tests.
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 30 May 2024 05:23:55 +0000 (22:23 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Thu, 30 May 2024 16:25:23 +0000 (09:25 -0700)
commit7695542423b36a84e6be56935648e325e366d313
tree6605796c286292f84cbe993a6b9d6f13fc085649
parent8c438550ae39a7b5aadbdb4b01b328749b6e6b8c
Test262: fixed flaky fs tests.

Previously, two tests running in parallel could occasionally generate
identical file names because Math.random() was used for part of the file
name, leading to one of the tests failing.

The fix is to use a single global counter to generate file names,
ensuring deterministic and unique file names for each test.
test/fs/methods.t.js