psalagnac commented on code in PR #3036:
URL: https://github.com/apache/solr/pull/3036#discussion_r1918222271
##########
solr/solrj/src/test/org/apache/solr/common/cloud/PerReplicaStatesIntegrationTest.java:
##########
@@ -245,50 +245,42 @@ public void testMultipleTransitions() throws Exception {
.resolve("streaming")
.resolve("conf"))
.configure();
- PerReplicaStates original = null;
try {
CollectionAdminRequest.createCollection(COLL, "conf", 3, 1)
.setPerReplicaState(Boolean.TRUE)
.process(cluster.getSolrClient());
cluster.waitForActiveCollection(COLL, 3, 3);
PerReplicaStates prs1 =
- original =
- PerReplicaStatesOps.fetch(
- DocCollection.getCollectionPath(COLL),
cluster.getZkClient(), null);
+ PerReplicaStatesOps.fetch(
+ DocCollection.getCollectionPath(COLL), cluster.getZkClient(),
null);
log.info("prs1 : {}", prs1);
CollectionAdminRequest.modifyCollection(
COLL, Collections.singletonMap(PER_REPLICA_STATE, "false"))
.process(cluster.getSolrClient());
- cluster
- .getZkStateReader()
- .waitForState(
- COLL,
- 5,
- TimeUnit.SECONDS,
- (liveNodes, collectionState) ->
-
"false".equals(collectionState.getProperties().get(PER_REPLICA_STATE)));
+ waitForState(
+ "Waiting for PRS property",
+ COLL,
+ collectionState ->
+
"false".equals(collectionState.getProperties().get(PER_REPLICA_STATE)));
CollectionAdminRequest.modifyCollection(
COLL, Collections.singletonMap(PER_REPLICA_STATE, "true"))
.process(cluster.getSolrClient());
- cluster
- .getZkStateReader()
- .waitForState(
- COLL,
- 5,
- TimeUnit.SECONDS,
Review Comment:
Good point. Default timeout is 45 seconds.
I don't know whether this test has a specific need or not, so I'm restoring
the 5 seconds.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]