Commit 11a2d1c
test: add and use tmpdir.hasEnoughSpace()
In general, we assume that the tmpdir will provide sufficient space for
most tests. Some tests, however, require hundreds of megabytes or even
gigabytes of space, which often causes them to fail, especially on our
macOS infrastructure. The most recent reliability report contains more
than 20 related CI failures.
This change adds a new function hasEnoughSpace() to the tmpdir module
that uses statfsSync() to guess whether allocating a certain amount of
space within the temporary directory will succeed.
This change also updates the most frequently failing tests to use the
new function such that the relevant parts of the tests are skipped if
tmpdir has insufficient space.
Refs: nodejs/reliability#549
PR-URL: #47767
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>1 parent 72443bc commit 11a2d1cCopy full SHA for 11a2d1c
File tree
Expand file treeCollapse file tree
5 files changed
+52
-22
lines changedOpen diff view settings
Filter options
- test
- common
- parallel
- pummel
Expand file treeCollapse file tree
5 files changed
+52
-22
lines changedOpen diff view settings
Collapse file
+9Lines changed: 9 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1027 | 1027 | |
1028 | 1028 | |
1029 | 1029 | |
| 1030 | + |
| 1031 | + |
| 1032 | + |
| 1033 | + |
| 1034 | + |
| 1035 | + |
| 1036 | + |
| 1037 | + |
| 1038 | + |
1030 | 1039 | |
1031 | 1040 | |
1032 | 1041 | |
|
Collapse file
+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
55 | 55 | |
56 | 56 | |
57 | 57 | |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
58 | 63 | |
59 | 64 | |
60 | 65 | |
| 66 | + |
61 | 67 | |
Collapse file
test/parallel/test-fs-promises-file-handle-readFile.js
Copy file name to clipboardExpand all lines: test/parallel/test-fs-promises-file-handle-readFile.js+16-11Lines changed: 16 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
106 | 106 | |
107 | 107 | |
108 | 108 | |
109 | | - |
110 | | - |
111 | | - |
112 | | - |
113 | | - |
114 | | - |
115 | | - |
116 | | - |
117 | | - |
118 | | - |
119 | | - |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
120 | 125 | |
121 | 126 | |
122 | 127 | |
|
Collapse file
test/parallel/test-fs-readfile.js
Copy file name to clipboardExpand all lines: test/parallel/test-fs-readfile.js+17-11Lines changed: 17 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
52 | 52 | |
53 | 53 | |
54 | 54 | |
55 | | - |
| 55 | + |
| 56 | + |
56 | 57 | |
57 | 58 | |
58 | 59 | |
59 | | - |
60 | | - |
61 | | - |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
62 | 67 | |
63 | | - |
64 | | - |
65 | | - |
66 | | - |
67 | | - |
68 | | - |
69 | | - |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
70 | 76 | |
71 | 77 | |
72 | 78 | |
|
Collapse file
test/pummel/test-fs-readfile-tostring-fail.js
Copy file name to clipboardExpand all lines: test/pummel/test-fs-readfile-tostring-fail.js+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
16 | 16 | |
17 | 17 | |
18 | 18 | |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
19 | 23 | |
20 | 24 | |
21 | 25 | |
|
0 commit comments