-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add test guide #19854
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
Add test guide #19854
Conversation
c21b59c to
45a4875
Compare
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 have a section about testing with SaaS, like BigQuery and Redshift? That Trino uses accounts sponsored by third parties and the credentials are not shared, so tests don't run by default in PRs, must be manually approved by maintainers and require own set of credentials to be executed locally.
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.
I think so .. but in a separate section somewhere .. maybe combined with the explanation about "product tests" or "integration tests" .. will talk to @martint to figure out what name to choose and where to put it on this page.
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.
the problem this solves is that the test frameworks (neither JUnit not TestNG) don't allow controlling number of concurrent test methods per class.
e.g. how do you for example have a test class which mostly spends time waiting for I/O or some failure and reduce it's runtime?
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 this really a problem worth solving .. could you just split the test class up into multiple classes for different aspects and then you have the different classes run tests in parallel? Huge test classes with lots of test methods are probably a bad idea anyway .. any thoughts @martint ?
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.
then you have the different classes run tests in parallel?
Still doesn't solve the problem. The concurrency of test is global in JUnit, ie. if you say 4 concurrent tests you will only have 4 no matter how many test classes you split it into.
You can only override it on a maven module basis via surefire config but that means a separate maven module (or profile) for each such "group of tests".
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.
This section is still here for reference only .. I can delete any time .. imho all aspects are covered but wanted to have it here for reviewers for now
|
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
|
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
|
Reminder @martint .. I think just a quick read and merge will be okay since we plan to iterate on this anyway. |
|
All updated.. imho this is good enough for merge and later refinement @martint |
|
This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua |
|
Waiting for final review from @martint |
|
Thank you @martint |
Description
Add guidelines for writing tests.
Additional context and related issues
Converted from google doc - follow up about role on website will come after merge.
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.
However.. we should mention it somewhere quite prominently.