Skip to content
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

test(db): use h2:file db mode by default #1096

Merged
merged 11 commits into from
Oct 6, 2022

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Oct 5, 2022

Fixes #1094
Depends on #1083

@andrewazores andrewazores marked this pull request as draft October 5, 2022 16:43
@andrewazores andrewazores changed the title chore(smoketest): use h2:file db mode by default test(db): use h2:file db mode by default Oct 5, 2022
@andrewazores andrewazores force-pushed the h2file-default branch 2 times, most recently from 5ea7928 to 5b5a39d Compare October 5, 2022 17:41
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2022

This PR/issue depends on:

@andrewazores
Copy link
Member Author

Along with setting the h2:file mode to the default in smoketest.sh and the pom.xml itest setup, I also made a few minor changes to some itests themselves to disable credentials handling in the AutoRulesIT, at least temporarily. I'm not sure exactly why but that test is flaky with the interaction between credentials, target discovery, and rule activation, though in practice with manual testing I can never reproduce the failure.

I also removed some detach calls from within DAOs. The entities should be fine detached, but removing these calls also seemed to improve the test reliability somewhat.

There's more work to be done around the DAOs and how we use Hibernate/JPA in general to ensure we're handling data consistency properly and not leaving resources open, but that's outside the scope of this PR.

@maxcao13
Copy link
Member

maxcao13 commented Oct 6, 2022

Along with setting the h2:file mode to the default in smoketest.sh and the pom.xml itest setup, I also made a few minor changes to some itests themselves to disable credentials handling in the AutoRulesIT, at least temporarily. I'm not sure exactly why but that test is flaky with the interaction between credentials, target discovery, and rule activation, though in practice with manual testing I can never reproduce the failure.

Is there any useful logs of these runs that I may be able to look at?

@andrewazores
Copy link
Member Author

I didn't bother preserving any of the ones I observed locally, but this CI run looks like it's the same thing:

https://github.com/cryostatio/cryostat/actions/runs/3198632408/jobs/5223422453

maxcao13
maxcao13 previously approved these changes Oct 6, 2022
Copy link
Member

@maxcao13 maxcao13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, that's weird - not too sure as of now without diving too deep, but anyways this PR looks good!

@andrewazores
Copy link
Member Author

Sorry, I just went back and checked on the JPA entity detachment thing and found that the change was no longer making any difference. It may have just seemed that way by coincidence yesterday when I was testing it since it was only affecting the flaky test(s) to begin with.

@andrewazores
Copy link
Member Author

I also included a change to the repeated-integration-testing.bash script to reduce the JDP polling times and not require multiple verifications of the count. Those default settings are overly cautious and cause tests to run a fair bit slower than really necessary, so using that development re-testing script to experiment with speeding JDP things up could be interesting.

Copy link
Member

@maxcao13 maxcao13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes dev testing a lot faster, right looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Task] Development and CI runs should use h2:file mode by default
2 participants