dsmiley commented on code in PR #4996:
URL: https://github.com/apache/solr/pull/4996#discussion_r4161623697


##########
changelog/unreleased/SOLR-18280.yml:
##########
@@ -0,0 +1,7 @@
+title: Fix flaky TestReplicationHandler.testUrlAllowList (honor 
TEST_URL_ALLOW_LIST, stop wrapping doTestDetails).

Review Comment:
   fixing tests isn't changelog worthy.



##########
solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java:
##########
@@ -144,6 +144,8 @@ public void clearIndexWithReplication() throws Exception {
   @After
   public void tearDown() throws Exception {
     super.tearDown();
+    System.clearProperty(AllowListUrlChecker.ENABLE_URL_ALLOW_LIST);
+    System.clearProperty(TEST_URL_ALLOW_LIST);

Review Comment:
   Solr's test infra resets all System properties without tests needing to do 
this.  It's in SolrTestCase as a Rule



##########
solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerUrlAllowList.java:
##########
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.handler;
+
+import static org.hamcrest.CoreMatchers.containsString;
+
+import java.nio.file.Path;
+import java.util.List;
+import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.common.SolrException;
+import org.apache.solr.common.util.NamedList;
+import org.apache.solr.core.SolrCore;
+import org.apache.solr.embedded.JettySolrRunner;
+import org.apache.solr.handler.ReplicationTestHelper.SolrInstance;
+import org.apache.solr.security.AllowListUrlChecker;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Non-nightly coverage for SOLR-18280. {@link TestReplicationHandler} is 
{@code @Nightly}; the

Review Comment:
   Lets drop the JIRA reference here, unless you think there's great context 
for someone reading later.



-- 
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]

Reply via email to