-
Notifications
You must be signed in to change notification settings - Fork 18
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
Enable integration tests #29
Conversation
forus
commented
Mar 19, 2024
- Fix and un-ignore most of tests that work with cbioportal database (aka integration tests)
- Document how to prepare cbioportal test database and run integration tests
3191138
to
b07232a
Compare
@forus it looks like the Java CI is failing - is that expected?
|
@inodb Hi! No, that is not expected. I'm looking into it. |
@inodb It seems like a permission problem. The dependency graph snapshot could not be uploaded to GitHub. Cold it be because the PR is created between organisations? @sheridancbio gotten this issue as well #25 |
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.
lgtm
@inodb I think we should update the Java CI with maven job to only update dep. graph on push to main not PR |
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.
Instead of IT and not IT names in front of the classes you should divide them into two directories it and <>. This will make the file names look nicer, show better organization inside the IDE, and help out with the way that the POM is setup.
Other then that this LGTM.
Hi Jeremy (@JREastonMarks), Thank you for your feedback. I agree with you that it would be a better code organisation. In fact, I tried to split directories to In my most recent attempt, I used Below is the relevant plugin configuration used:
Have you, or anyone else on the team, successfully implemented such a directory split before? If so, I'd greatly appreciate any insights or suggestions on how to resolve the issues encountered. Given the improvements this PR brings to our current setup, I recommend proceeding with the merge. We can revisit and attempt a more distinct separation of test directories when we know more. |
I would do something like the following: That way you aren't messing with the file organization which can make build systems unhappy. |
I see. So you propose to have a special How about having I am not sure you could drop Test* in the name. We have helper classes that are not test classes e.g. |
@forus The issue with doing at such a high level is that /src/test/[PACKAGE NAME] is that your code is in the IDE is going to be in multiple places as well as issues getting it to run. If you keep the code closer to the packages and areas that it tests and touches then it makes it easier for developers to work with it. So instead of The big goal, outside of just having the tests run, is to make sure that they can easily be updated and accessed. We can write amazing tests but if people don't keep up with them or have a difficult time running them then they lose their purpose. |
@JREastonMarks Please have another look. Test classes names do not to follow any naming convention to run properly after all. The surefire plugin distinguish tests from utility test classes just fine and we don't need to help it in this. |
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.
It's closer but still some changes are needed
src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoSampleList.java
Outdated
Show resolved
Hide resolved
src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoSampleProfile.java
Outdated
Show resolved
Hide resolved
src/test/java/org/mskcc/cbio/portal/integrationTest/pancancer/LargeTestSetGenerator.java
Outdated
Show resolved
Hide resolved
...st/java/org/mskcc/cbio/portal/integrationTest/pancancer/TestPanCancerStudySummaryImport.java
Outdated
Show resolved
Hide resolved
src/test/java/org/mskcc/cbio/portal/integrationTest/scripts/TestImportTabDelimData.java
Outdated
Show resolved
Hide resolved
src/test/java/org/mskcc/cbio/portal/integrationTest/servlet/TestWebService.java
Outdated
Show resolved
Hide resolved
Warning was not shown because process mistakenly thought it's running from a web server
They passing when run one by one. But fail when you run them in batch due dirty database state (created by other tests?).
With the old version, db integration tests did not roll back inserted data properly
Integrationt test class name does not have to follow any naming convention anymore as soon as it placed under integrationTest package. We renamed all integration tests from IT* to Test* for readability purpose.
04d49aa
to
0b48914
Compare
07906b8
to
8e49ff5
Compare
src/test/java/org/mskcc/cbio/portal/scripts/TestCutInvalidCases.java
Outdated
Show resolved
Hide resolved
src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoCancerStudy.java
Outdated
Show resolved
Hide resolved
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.
One small thing left but it looks good to me
src/test/java/org/mskcc/cbio/portal/integrationTest/dao/TestDaoMutation.java
Outdated
Show resolved
Hide resolved
After rebasing on the recent version of main branch, integration tests started to fail. I am looking into that. |
I've commented out the configuration that caused integration tests to fail |