-
Notifications
You must be signed in to change notification settings - Fork 73
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 bwc tests & enable code coverage badge #184
Conversation
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #184 +/- ##
=======================================
Coverage ? 53.19%
Complexity ? 65
=======================================
Files ? 8
Lines ? 438
Branches ? 50
=======================================
Hits ? 233
Misses ? 186
Partials ? 19 Continue to review full report at Codecov.
|
.../src/test/java/org/opensearch/jobscheduler/sampleextension/SampleExtensionIntegTestCase.java
Outdated
Show resolved
Hide resolved
...va/org/opensearch/jobscheduler/sampleextension/bwc/JobSchedulerBackwardsCompatibilityIT.java
Show resolved
Hide resolved
...va/org/opensearch/jobscheduler/sampleextension/bwc/JobSchedulerBackwardsCompatibilityIT.java
Outdated
Show resolved
Hide resolved
...va/org/opensearch/jobscheduler/sampleextension/bwc/JobSchedulerBackwardsCompatibilityIT.java
Outdated
Show resolved
Hide resolved
break; | ||
case UPGRADED: | ||
Assert.assertTrue(pluginNames.contains("opensearch-job-scheduler")); | ||
createBasicWatcherJob(); |
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.
Could you add a comment about the strategy of the BWC test? It would be difficult for someone with no context to realize why you are using the hardcoded string with no explanation. I would also like to see some more comments throughout, I always find the BWC tests a bit difficult to read.
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.
+1
I am wondering why only do the createBasicWatcherJob
in UPGRADED but not OLD and MIXED.
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.
From the gradle file bwc tests setup, it looks to me that the rolling upgrade bwc tests are using the same cluster testClusters."${baseName}0
, so prob you only need to create job at the OLD cluster, and only assert it's running at MIXED and UPGRADED cluster.
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.
hi @bowenlan-amzn , we cannot create a job in old cluster as sample-extension plugin is not loaded as old zip file is not available
Assert.assertTrue(pluginNames.contains("opendistro-job-scheduler")); | ||
break; | ||
case MIXED: | ||
Assert.assertTrue(pluginNames.contains("opensearch-job-scheduler")); |
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.
Do we want to assert both opendistro and opensearch here?
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.
fixed it
Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
Signed-off-by: Subhobrata Dey sbcd90@gmail.com
Description
this PR add bwc tests & enable code coverage badge for job-scheduler.
Issues Resolved
Add backwards compatibility tests for automation
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.