Skip to content

Commit

Permalink
api-testing: Further increase ETag number in transform tests
Browse files Browse the repository at this point in the history
Change I5521b7652f (commit 682a19e) increased the number by roughly
one order of magnitude, which leaves me nervous that the tests might
start failing again if enough other tests are run in the same wiki to
let the increased revision IDs exist. Let鈥檚 bump it further to make that
much less likely (though not impossible).

1219844647 is an arbitrary large number; my intention in choosing a
random-looking number (rather than, say, 1234567890) is that it鈥檚 easier
to search for, both in codesearch and in commit messages, if it should
ever pop up in an error message.

Bug: T366142
Change-Id: I8186d9d46bc2a3f5ec04b38aab5cbe85e609835a
Follows-Up: I5521b7652faca9821fa08a9987a9452a4c555203
  • Loading branch information
lucaswerkmeister committed Jun 10, 2024
1 parent 4c673f1 commit a5c1fc6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/api-testing/REST/Transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -2361,7 +2361,7 @@ describe( '/transform/ endpoint', function () {
it( '/transform/ should refuse non-matching ETags in header', async () => {
const { status, text } = await client.req
.post( endpointPrefix + `/transform/html/to/wikitext/${ page }/${ revid }` )
.set( 'If-Match', '"13337/deadbeef"' )
.set( 'If-Match', '"1219844647/deadbeef"' )
.send( {
html: '<p>hello</p>'
} );
Expand All @@ -2374,7 +2374,7 @@ describe( '/transform/ endpoint', function () {
.post( endpointPrefix + `/transform/html/to/wikitext/${ page }` )
.send( {
html: '<p>hello</p>',
original: { etag: '"13337/deadbeef"' }
original: { etag: '"1219844647/deadbeef"' }
} );

assert.deepEqual( status, 412, text );
Expand Down Expand Up @@ -2412,7 +2412,7 @@ describe( '/transform/ endpoint', function () {
// request page HTML, but do not set 'stash' parameter!
const transformResponse = await client.req
.post( endpointPrefix + '/transform/html/to/wikitext/' )
.set( 'If-Match', '"12345/dummy"' )
.set( 'If-Match', '"1219844647/dummy"' )
.send( {
html: '<p>test</p>'
} );
Expand Down Expand Up @@ -2453,7 +2453,7 @@ describe( '/transform/ endpoint', function () {
.send( {
html: '<p>test</p>',
original: {
renderid: '"12345/dummy"'
renderid: '"1219844647/dummy"'
}
} );

Expand Down

0 comments on commit a5c1fc6

Please sign in to comment.