File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
solr/core/src/test/org/apache/solr/handler Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2727import java .nio .charset .StandardCharsets ;
2828import java .nio .file .Files ;
2929import java .nio .file .Path ;
30+ import java .nio .file .StandardCopyOption ;
3031import java .util .ArrayList ;
3132import java .util .Properties ;
3233import java .util .concurrent .TimeUnit ;
@@ -56,7 +57,8 @@ public final class ReplicationTestHelper {
5657 public static JettySolrRunner createAndStartJetty (SolrInstance instance ) throws Exception {
5758 Files .copy (
5859 Path .of (SolrTestCaseJ4 .TEST_HOME (), "solr.xml" ),
59- Path .of (instance .getHomeDir (), "solr.xml" ));
60+ Path .of (instance .getHomeDir (), "solr.xml" ),
61+ StandardCopyOption .REPLACE_EXISTING );
6062 Properties nodeProperties = new Properties ();
6163 nodeProperties .setProperty ("solr.data.dir" , instance .getDataDir ());
6264 JettyConfig jettyConfig = JettyConfig .builder ().setPort (0 ).build ();
Original file line number Diff line number Diff line change 7070import org .apache .solr .core .CoreContainer ;
7171import org .apache .solr .core .SolrCore ;
7272import org .apache .solr .core .StandardDirectoryFactory ;
73- import org .apache .solr .core .snapshots .SolrSnapshotMetaDataManager ;
7473import org .apache .solr .embedded .JettySolrRunner ;
7574import org .apache .solr .handler .admin .api .ReplicationAPIBase ;
7675import org .apache .solr .security .AllowListUrlChecker ;
@@ -1037,8 +1036,7 @@ private int indexDirCount(String ddir) {
10371036 @ Override
10381037 public boolean accept (File dir , String name ) {
10391038 File f = new File (dir , name );
1040- return f .isDirectory ()
1041- && !SolrSnapshotMetaDataManager .SNAPSHOT_METADATA_DIR .equals (name );
1039+ return f .isDirectory () && !name .startsWith ("snapshot" );
10421040 }
10431041 });
10441042 return list .length ;
You can’t perform that action at this time.
0 commit comments