-
Notifications
You must be signed in to change notification settings - Fork 883
chore(site): Make tests faster #6543
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
Conversation
module.exports = { | ||
maxWorkers, | ||
testTimeout: 10_000, | ||
maxWorkers: 8, |
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.
Isn't this value going to be set in CI anyways? It'd be ideal to use all 64 cores in dogfood
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.
Yes, but when it happens into 64 cores at the same time, the output is kinda crazy. I think we can remove it if it is too slow tho but with 8 workers, it is kinda fast.
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.
Makes sense!
@@ -20,7 +20,7 @@ export const FullScreenLoader: FC = () => { | |||
const styles = useStyles() | |||
|
|||
return ( | |||
<div className={styles.root}> | |||
<div className={styles.root} data-testid="loader"> |
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.
Is it still slow if we keep querying using getByRole
but also use within? Just curious when we have to add a data-testid
and when we can avoid it.
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.
Yes, the getByRole does a lot of "math" behind the scenes to calculate the right role of an element. When we do a within, we reduce the number of elements the getByRole has to iterate over to find the right element.
ByRole
queries to make the queries fasterFYI: Compared with
main
, this branch runs tests 50% faster on GitHub Actions.