Skip to content

Commit 8210d2f

Browse files
committed
add attribution and mark tests as flaky
1 parent a43abfa commit 8210d2f

2 files changed

Lines changed: 23 additions & 13 deletions

File tree

test/web-platform-tests/expectation.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,8 +1927,7 @@
19271927
},
19281928
{
19291929
"name": "Fetch with POST with text body on 421 response should be retried once on new connection.",
1930-
"success": false,
1931-
"message": "promise_test: Unhandled rejection with value: object \"TypeError: fetch failed\""
1930+
"flaky": true
19321931
},
19331932
{
19341933
"name": "Streaming upload shouldn't work on Http/1.1.",
@@ -4868,7 +4867,7 @@
48684867
{
48694868
"name": "Consume response's body: from FormData to blob",
48704869
"success": false,
4871-
"message": "assert_equals: Blob body type should be computed from the response Content-Type expected \"multipart/form-data; boundary=----formdata-undici-028084995963\" but got \"multipart/form-data;boundary=----formdata-undici-028084995963\""
4870+
"message": "assert_equals: Blob body type should be computed from the response Content-Type expected \"multipart/form-data; boundary=----formdata-undici-039669715930\" but got \"multipart/form-data;boundary=----formdata-undici-039669715930\""
48724871
},
48734872
{
48744873
"name": "Consume response's body: from FormData to text",
@@ -15128,7 +15127,7 @@
1512815127
{
1512915128
"name": "Response with Cache-Control: max-age=2592000, public and Pragma: no-cache should be cached",
1513015129
"success": false,
15131-
"message": "assert_equals: Responses should be identical, indicating caching expected \"Timestamp: 1756760263.1691139\" but got \"Timestamp: 1756760263.166111\""
15130+
"message": "assert_equals: Responses should be identical, indicating caching expected \"Timestamp: 1756761942.1472726\" but got \"Timestamp: 1756761942.1442726\""
1513215131
}
1513315132
]
1513415133
},
@@ -24888,7 +24887,7 @@
2488824887
{
2488924888
"name": "Second fetch returns same response",
2489024889
"success": false,
24891-
"message": "assert_equals: expected \"qjnujnescwumzwmkdmeb\" but got \"akzcmcgmxybqdbvnafyf\""
24890+
"message": "assert_equals: expected \"qnjgwbsjgufbkfakqkyp\" but got \"rvzexnqkvavhpvmyzpux\""
2489224891
}
2489324892
]
2489424893
},
@@ -39734,8 +39733,7 @@
3973439733
"cases": [
3973539734
{
3973639735
"name": "clean close should be clean",
39737-
"success": false,
39738-
"message": "assert_true: readable should be closed expected true got false"
39736+
"flaky": true
3973939737
},
3974039738
{
3974139739
"name": "close frame with no body should result in status code 1005",

test/web-platform-tests/wpt-runner.mjs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright 2018-2025 the Deno authors. MIT license.
2+
13
import { spawn } from 'node:child_process'
24
import { readFileSync, writeFileSync, existsSync } from 'node:fs'
35
import { join } from 'node:path'
@@ -169,11 +171,22 @@ function updateExpectations (results) {
169171
// Set the expectation based on test result
170172
current[filename] = {
171173
success: result.status === 0, // If test file itself did not error
172-
cases: result.cases.map((c) => ({
173-
name: c.name,
174-
success: c.status === 0,
175-
message: c.message ?? undefined
176-
}))
174+
cases: result.cases.map((c) => {
175+
const currentCase = current[filename]?.cases.find((cc) => cc.name === c.name)
176+
177+
if (currentCase?.flaky) {
178+
return {
179+
name: c.name,
180+
flaky: true
181+
}
182+
}
183+
184+
return {
185+
name: c.name,
186+
success: c.status === 0,
187+
message: c.message ?? undefined
188+
}
189+
})
177190
}
178191
}
179192

@@ -498,7 +511,6 @@ switch (command) {
498511
await setup()
499512
break
500513
case 'run':
501-
// TODO: find what's causing the unsettled top-level await
502514
await run(filters)
503515
break
504516
default:

0 commit comments

Comments
 (0)