You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "psalagnac (via GitHub)" <gi...@apache.org> on 2024/12/10 14:23:09 UTC
[PR] SOLR-16390: fix flaky test ClusterPropsAPITest.testClusterPropertyOpsAllGood [solr]
psalagnac opened a new pull request, #2901:
URL: https://github.com/apache/solr/pull/2901
https://issues.apache.org/jira/browse/SOLR-16390
(linking to the Jira that introduced the test)
<!--
_(If you are a project committer then you may remove some/all of the following template.)_
Before creating a pull request, please file an issue in the ASF Jira system for Solr:
* https://issues.apache.org/jira/projects/SOLR
For something minor (i.e. that wouldn't be worth putting in release notes), you can skip JIRA.
To create a Jira issue, you will need to create an account there first.
The title of the PR should reference the Jira issue number in the form:
* SOLR-####: <short description of problem or changes>
SOLR must be fully capitalized. A short description helps people scanning pull requests for items they can work on.
Properly referencing the issue in the title ensures that Jira is correctly updated with code review comments and commits. -->
# Description
The test fails when SSL is enabled, because of testing framework that set 'urlScheme' cluster property.
I was looking at the failure in another PR, and it seems this test fails quite often since #2788. I don't think it is tracked somewhere else.
# Solution
This change updates the test to ignore existing cluster properties.
# Tests
n/a
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16390: fix flaky test ClusterPropsAPITest.testClusterPropertyOpsAllGood [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on code in PR #2901:
URL: https://github.com/apache/solr/pull/2901#discussion_r1878865570
##########
solr/core/src/test/org/apache/solr/handler/admin/api/ClusterPropsAPITest.java:
##########
@@ -103,10 +109,9 @@ public void testClusterPropertyOpsAllGood() throws Exception {
// List Properties, this time there should be 1
o = Utils.executeGET(client.getHttpClient(), baseUrlV2ClusterProps, Utils.JSONCONSUMER);
assertNotNull(o);
- assertEquals(1, ((List<?>) getObjectByPath(o, true, "clusterProperties")).size());
- assertEquals(
- testClusterProperty,
- (String) ((List<?>) getObjectByPath(o, true, "clusterProperties")).get(0));
+ assertEquals(initCount + 1, ((List<?>) getObjectByPath(o, true, "clusterProperties")).size());
Review Comment:
much nicer!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16390: fix flaky test ClusterPropsAPITest.testClusterPropertyOpsAllGood [solr]
Posted by "psalagnac (via GitHub)" <gi...@apache.org>.
psalagnac commented on code in PR #2901:
URL: https://github.com/apache/solr/pull/2901#discussion_r1878857962
##########
solr/core/src/test/org/apache/solr/handler/admin/api/ClusterPropsAPITest.java:
##########
@@ -103,10 +109,9 @@ public void testClusterPropertyOpsAllGood() throws Exception {
// List Properties, this time there should be 1
o = Utils.executeGET(client.getHttpClient(), baseUrlV2ClusterProps, Utils.JSONCONSUMER);
assertNotNull(o);
- assertEquals(1, ((List<?>) getObjectByPath(o, true, "clusterProperties")).size());
- assertEquals(
- testClusterProperty,
- (String) ((List<?>) getObjectByPath(o, true, "clusterProperties")).get(0));
+ assertEquals(initCount + 1, ((List<?>) getObjectByPath(o, true, "clusterProperties")).size());
Review Comment:
Good point. I'm updating the test to check the property exists instead of counting.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16390: fix flaky test ClusterPropsAPITest.testClusterPropertyOpsAllGood [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #2901:
URL: https://github.com/apache/solr/pull/2901#discussion_r1878613448
##########
solr/core/src/test/org/apache/solr/handler/admin/api/ClusterPropsAPITest.java:
##########
@@ -103,10 +109,9 @@ public void testClusterPropertyOpsAllGood() throws Exception {
// List Properties, this time there should be 1
o = Utils.executeGET(client.getHttpClient(), baseUrlV2ClusterProps, Utils.JSONCONSUMER);
assertNotNull(o);
- assertEquals(1, ((List<?>) getObjectByPath(o, true, "clusterProperties")).size());
- assertEquals(
- testClusterProperty,
- (String) ((List<?>) getObjectByPath(o, true, "clusterProperties")).get(0));
+ assertEquals(initCount + 1, ((List<?>) getObjectByPath(o, true, "clusterProperties")).size());
Review Comment:
IMO this test shouldn't bother checking the size; it need only check that the entry it's expecting is there or is not there. Hamcrest test utils helps. I did this a day or two ago in this test: https://github.com/apache/solr/blob/2d3a8d9954a45c0eb1bbaa77b29f51ce314c1849/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ClusterStateProviderTest.java#L165
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16390: fix flaky test ClusterPropsAPITest.testClusterPropertyOpsAllGood [solr]
Posted by "psalagnac (via GitHub)" <gi...@apache.org>.
psalagnac merged PR #2901:
URL: https://github.com/apache/solr/pull/2901
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16390: fix flaky test ClusterPropsAPITest.testClusterPropertyOpsAllGood [solr]
Posted by "anshumg (via GitHub)" <gi...@apache.org>.
anshumg commented on PR #2901:
URL: https://github.com/apache/solr/pull/2901#issuecomment-2588958453
Thanks @dsmiley
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16390: fix flaky test ClusterPropsAPITest.testClusterPropertyOpsAllGood [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on PR #2901:
URL: https://github.com/apache/solr/pull/2901#issuecomment-2588821171
FYI @anshumg I pushed this fix to branch_9_8 as a number of builds fail without this fix. It's been on branch_9x since December 10th.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-16390: fix flaky test ClusterPropsAPITest.testClusterPropertyOpsAllGood [solr]
Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija commented on PR #2901:
URL: https://github.com/apache/solr/pull/2901#issuecomment-2536045100
Sorry all for the bug - thanks for fixing this @psalagnac (and for reviewing, David and Eric!)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org