-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TINY-11177: Vastly improve remote testing #145
base: master
Are you sure you want to change the base?
Conversation
…it for the report AJAX requests to complete before moving on to the next test.
…d a client-side fix.
…it would be misleading if they were treated as passing.
…th test reports and offsets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this affect junit reporting would the in flight requests make them in random order or would things be skipped.
I posted in slack that this destroys JUnit reporting. Ideas for how to fix: |
…ts. Manual mode works, auto still needs some work.
4feac22
to
e80663d
Compare
…to the end of the test run are now waited for correctly.
…ce for every result
…an empty rejected promise
…her chunks or test retry
… in the catch block
@@ -139,19 +179,54 @@ export const Reporter = (params: UrlParams, callbacks: Callbacks, ui: ReporterUi | |||
}; | |||
}; | |||
|
|||
const waitForResults = async (): Promise<void> => { | |||
sendCurrentResults(); | |||
if (requestsInFlight.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we explicitly put a Promise.resolve()
in an else
block if requestsInFlight is a length of 0?
sh 'yarn build' | ||
}, | ||
testDirs: [ 'modules/sample/src/test/ts/**/pass' ], | ||
custom: '--config modules/sample/tsconfig.json --customRoutes modules/sample/routes.json --polyfills Promise Symbol' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the polyfills now since we are running on browsers that support Promise and Symbol?
requestsInFlight.length = 0; | ||
return Promise.all(currentRequests).then(() => { | ||
// if more things have been queued, such as a failing test stack trace, wait for those as well | ||
waitForResults(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be returning the promise from waitForResults
? Although, I think since the function has the async
identifier, JavaScript must handle it automagically.
Related Ticket: TINY-11177
Description of Changes:
/start
before eachit
block, and then again to/results
after eachit
block. It would wait for these requests to finish before continuing./start
is now sent at startup and after every 50 tests. This can be made larger if we find it's still too slow./results
is now only sent for failure and skip, not pass.Promise.all()
at the very end to wait for them.bedrock
CLI console HUD depended on receiving these status updates, so I had to adjust it to account for the missing reports.favicon.ico
request which probably also slowed things down.keep-alive
header is now set, instead of using the default 5 seconds which was causing occasional502 Bad Gateway
errors.Pre-checks:
Tests have been added (if applicable)Before merging: