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

More itest refactoring, cleanup, slight stabilization #532

Merged
merged 9 commits into from
Jun 23, 2021

Conversation

andrewazores
Copy link
Member

This refactors the TestBase class into bases/StandardSelfTest, creates a new bases/ExternalTargetsTest, and sets the InterleavedExternalTargetRequestsIT and AutoRulesIT to extend ExternalTargetsTest. This is mostly just to clean up the test class and remove common setup/teardown logic from test logic, and it also allows AutoRulesIT to do the same timed-retry-polling on teardown as InterleavedExternalTargetRequestsIT already does, which may also help to stabilize JDP discovery-related intermittent failures.

Copy link
Contributor

@jan-law jan-law left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@andrewazores andrewazores merged commit ae3b9b4 into cryostatio:main Jun 23, 2021
@andrewazores andrewazores deleted the itest-bases-refactor branch June 23, 2021 14:42
andrewazores added a commit to andrewazores/cryostat that referenced this pull request Jun 23, 2021
* Move TestBase into bases package

* Rename class

* Extract ExternalTargetsTest base

* Log expected target counts

* Apply spotless formatting

* Add waitForDiscovery(0) @afterall

* fixup! Log expected target counts

* AutoRulesIT waits for JDP to settle on cleanup

* Set test order
andrewazores added a commit to andrewazores/cryostat that referenced this pull request Jun 23, 2021
* Move TestBase into bases package

* Rename class

* Extract ExternalTargetsTest base

* Log expected target counts

* Apply spotless formatting

* Add waitForDiscovery(0) @afterall

* fixup! Log expected target counts

* AutoRulesIT waits for JDP to settle on cleanup

* Set test order
jan-law pushed a commit that referenced this pull request Jun 23, 2021
* InterleavedExternalTargetRequestsIT waits and retries if too many targets observed in setup (#531)

* If too many targets are found, wait and retry

JDP occasionally discovers too many targets. This commit allows the integration test to wait and retry if this scenario is observed, in case JDP settles and removes spurious targets after some delay. If not then the setup will still fail.

* Refactor to extract method

* Remove redundant assertion

Size assertion is not necessary - if size is mismatched then the set contents assertion that follows will also fail, and will include better detail as to what the root problem was

* Explicitly stop jfr-datasource/grafana-dashboard in test pod

* Add script for repeated integration test runs

* Allow more time for JDP to settle

* Wait for repeated observation of expected target count on setup

Repeated observations of the expected target count over time should largely eliminate any jitter from JDP discovery

* Print total setup elapsed time

* Remove accidentally added log files

* Remove redundant else

* More itest refactoring, cleanup, slight stabilization (#532)

* Move TestBase into bases package

* Rename class

* Extract ExternalTargetsTest base

* Log expected target counts

* Apply spotless formatting

* Add waitForDiscovery(0) @afterall

* fixup! Log expected target counts

* AutoRulesIT waits for JDP to settle on cleanup

* Set test order

* Apply spotless formatting
andrewazores added a commit to andrewazores/cryostat that referenced this pull request Jun 24, 2021
* Move TestBase into bases package

* Rename class

* Extract ExternalTargetsTest base

* Log expected target counts

* Apply spotless formatting

* Add waitForDiscovery(0) @afterall

* fixup! Log expected target counts

* AutoRulesIT waits for JDP to settle on cleanup

* Set test order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants