This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 9d67ad63ce1 SOLR-17556: Fix smokeTest to use films as example for slim 
distribution (#3020)
9d67ad63ce1 is described below

commit 9d67ad63ce182ca9bf463023b3ae16c35a65516f
Author: Houston Putman <hous...@apache.org>
AuthorDate: Fri Jan 10 11:02:10 2025 -0600

    SOLR-17556: Fix smokeTest to use films as example for slim distribution 
(#3020)
    
    Also remove test_utf8 from the smoke test, and the data for the test.
    Added the ability to set the solr home directory for examples. this is 
important for testing, but is much better than modifying the server directory 
in solr.
    
    (cherry picked from commit 80dfe11fe4c8f123f56ec2f85870d12b7e086e9e)
---
 dev-tools/scripts/smokeTestRelease.py              | 24 +++---
 .../java/org/apache/solr/cli/RunExampleTool.java   | 84 ++++++++++++++++---
 .../org/apache/solr/cli/TestSolrCLIRunExample.java | 10 +--
 .../apache/solr/cloud/SolrCloudExampleTest.java    |  2 +-
 .../handler/designer/TestSchemaDesignerAPI.java    |  2 +-
 .../solr/schema/TestUseDocValuesAsStored.java      |  2 +-
 solr/example/exampledocs/test_utf8.sh              | 93 ----------------------
 solr/example/exampledocs/utf8-example.xml          | 41 ----------
 solr/packaging/test/test_post.bats                 |  8 +-
 .../pages/tutorial-techproducts.adoc               |  2 -
 10 files changed, 94 insertions(+), 174 deletions(-)

diff --git a/dev-tools/scripts/smokeTestRelease.py 
b/dev-tools/scripts/smokeTestRelease.py
index f09dd5b0103..fbeef6375bd 100755
--- a/dev-tools/scripts/smokeTestRelease.py
+++ b/dev-tools/scripts/smokeTestRelease.py
@@ -690,7 +690,7 @@ def verifyUnpacked(java, artifact, unpackPath, gitRevision, 
version, testArgs):
     shutil.copytree(unpackPath, java11UnpackPath)
     os.chdir(java11UnpackPath)
     print('    test solr example w/ Java 11...')
-    testSolrExample(java11UnpackPath, java.java11_home)
+    testSolrExample(java11UnpackPath, java.java11_home, isSlim)
 
     if java.run_java17:
       print('    copying unpacked distribution for Java 17 ...')
@@ -700,7 +700,7 @@ def verifyUnpacked(java, artifact, unpackPath, gitRevision, 
version, testArgs):
       shutil.copytree(unpackPath, java17UnpackPath)
       os.chdir(java17UnpackPath)
       print('    test solr example w/ Java 17...')
-      testSolrExample(java17UnpackPath, java.java17_home)
+      testSolrExample(java17UnpackPath, java.java17_home, isSlim)
 
     os.chdir(unpackPath)
 
@@ -742,7 +742,7 @@ def is_port_in_use(port):
     with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
         return s.connect_ex(('localhost', port)) == 0
 
-def testSolrExample(binaryDistPath, javaPath):
+def testSolrExample(binaryDistPath, javaPath, isSlim):
   # test solr using some examples it comes with
   logFile = '%s/solr-example.log' % binaryDistPath
   old_cwd = os.getcwd() # So we can back-track
@@ -754,6 +754,10 @@ def testSolrExample(binaryDistPath, javaPath):
   env['JAVA_HOME'] = javaPath
   env['PATH'] = '%s/bin:%s' % (javaPath, env['PATH'])
 
+  example = "techproducts"
+  if isSlim:
+    example = "films"
+
   # Stop Solr running on port 8983 (in case a previous run didn't shutdown 
cleanly)
   try:
       if not cygwin:
@@ -763,22 +767,20 @@ def testSolrExample(binaryDistPath, javaPath):
   except:
      print('      Stop failed due to: '+sys.exc_info()[0])
 
-  print('      Running techproducts example on port 8983 from %s' % 
binaryDistPath)
+  print('      Running %s example on port 8983 from %s' % (example, 
binaryDistPath))
   try:
     if not cygwin:
-      runExampleStatus = subprocess.call(['bin/solr','-e','techproducts'])
+      runExampleStatus = subprocess.call(['bin/solr','-e',example])
     else:
-      runExampleStatus = subprocess.call('env "PATH=`cygpath -S -w`:$PATH" 
bin/solr.cmd -e techproducts', shell=True)
+      runExampleStatus = subprocess.call('env "PATH=`cygpath -S -w`:$PATH" 
bin/solr.cmd -e ' + example, shell=True)
 
     if runExampleStatus != 0:
-      raise RuntimeError('Failed to run the techproducts example, check log 
for previous errors.')
+      raise RuntimeError('Failed to run the %s example, check log for previous 
errors.' % example)
 
     os.chdir('example')
-    print('      test utf8...')
-    run('sh ./exampledocs/test_utf8.sh 
http://localhost:8983/solr/techproducts', 'utf8.log')
     print('      run query...')
-    s = load('http://localhost:8983/solr/techproducts/select/?q=video')
-    if s.find('"numFound":3,') == -1:
+    s = load('http://localhost:8983/solr/%s/select/?q=video' % example)
+    if s.find('"numFound":%d,' % (8 if isSlim else 3)) == -1:
       print('FAILED: response is:\n%s' % s)
       raise RuntimeError('query on solr example instance failed')
     s = load('http://localhost:8983/api/cores')
diff --git a/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java 
b/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java
index a9afa3be2db..44f249aa76d 100644
--- a/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java
@@ -48,6 +48,7 @@ import org.apache.commons.io.FileUtils;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.common.SolrException;
+import org.apache.solr.common.util.EnvUtils;
 import org.noggit.CharArr;
 import org.noggit.JSONWriter;
 
@@ -67,6 +68,7 @@ public class RunExampleTool extends ToolBase {
   protected String script;
   protected File serverDir;
   protected File exampleDir;
+  protected File solrHomeDir;
   protected String urlScheme;
 
   /** Default constructor used by the framework when running as a command-line 
application. */
@@ -123,7 +125,7 @@ public class RunExampleTool extends ToolBase {
         Option.builder()
             .longOpt("server-dir")
             .hasArg()
-            .argName("DIR")
+            .argName("SERVER_DIR")
             .required(true)
             .desc("Path to the Solr server directory.")
             .build(),
@@ -135,11 +137,19 @@ public class RunExampleTool extends ToolBase {
         Option.builder()
             .longOpt("example-dir")
             .hasArg()
-            .argName("DIR")
+            .argName("EXAMPLE_DIR")
             .required(false)
             .desc(
                 "Path to the Solr example directory; if not provided, 
${serverDir}/../example is expected to exist.")
             .build(),
+        Option.builder()
+            .longOpt("solr-home-dir")
+            .hasArg()
+            .argName("SOLR_HOME_DIR")
+            .required(false)
+            .desc(
+                "Path to the Solr home directory; if not provided, 
${serverDir}/solr is expected to exist.")
+            .build(),
         Option.builder()
             .longOpt("url-scheme")
             .hasArg()
@@ -190,6 +200,7 @@ public class RunExampleTool extends ToolBase {
   @Override
   public void runImpl(CommandLine cli) throws Exception {
     this.urlScheme = cli.getOptionValue("url-scheme", "http");
+    String exampleType = cli.getOptionValue("example");
 
     serverDir = new File(cli.getOptionValue("server-dir"));
     if (!serverDir.isDirectory())
@@ -228,16 +239,36 @@ public class RunExampleTool extends ToolBase {
               + exampleDir.getAbsolutePath()
               + " is not a directory!");
 
+    if (cli.hasOption("solr-home-dir")) {
+      solrHomeDir = new File(cli.getOptionValue("solr-home-dir"));
+    } else {
+      String solrHomeProp = EnvUtils.getProperty("solr.home");
+      if (solrHomeProp != null && !solrHomeProp.isEmpty()) {
+        solrHomeDir = new File(solrHomeProp);
+      } else if ("cloud".equals(exampleType)) {
+        solrHomeDir = new File(exampleDir, "cloud");
+        if (!solrHomeDir.isDirectory()) solrHomeDir.mkdir();
+      } else {
+        solrHomeDir = new File(serverDir, "solr");
+      }
+    }
+    if (!solrHomeDir.isDirectory())
+      throw new IllegalArgumentException(
+          "Value of --solr-home-dir option is invalid! "
+              + solrHomeDir.getAbsolutePath()
+              + " is not a directory!");
+
     echoIfVerbose(
         "Running with\nserverDir="
             + serverDir.getAbsolutePath()
             + ",\nexampleDir="
             + exampleDir.getAbsolutePath()
+            + ",\nsolrHomeDir="
+            + solrHomeDir.getAbsolutePath()
             + "\nscript="
             + script,
         cli);
 
-    String exampleType = cli.getOptionValue("example");
     if ("cloud".equals(exampleType)) {
       runCloudExample(cli);
     } else if ("techproducts".equals(exampleType)
@@ -262,8 +293,7 @@ public class RunExampleTool extends ToolBase {
     int port =
         Integer.parseInt(
             cli.getOptionValue('p', System.getenv().getOrDefault("SOLR_PORT", 
"8983")));
-    Map<String, Object> nodeStatus =
-        startSolr(new File(serverDir, "solr"), isCloudMode, cli, port, zkHost, 
30);
+    Map<String, Object> nodeStatus = startSolr(solrHomeDir, isCloudMode, cli, 
port, zkHost, 30);
 
     String solrUrl = SolrCLI.normalizeSolrUrl((String) 
nodeStatus.get("baseUrl"), false);
 
@@ -365,7 +395,8 @@ public class RunExampleTool extends ToolBase {
                 + "        }\n"
                 + "      }");
 
-        echo("Adding name, initial_release_date, and film_vector fields to 
films schema");
+        echo(
+            "Adding name, genre, directed_by, initial_release_date, and 
film_vector fields to films schema");
         SolrCLI.postJsonToSolr(
             solrClient,
             "/" + collectionName + "/schema",
@@ -377,6 +408,18 @@ public class RunExampleTool extends ToolBase {
                 + "          \"stored\":true\n"
                 + "        },\n"
                 + "        \"add-field\" : {\n"
+                + "          \"name\":\"genre\",\n"
+                + "          \"type\":\"text_general\",\n"
+                + "          \"multiValued\":true,\n"
+                + "          \"stored\":true\n"
+                + "        },\n"
+                + "        \"add-field\" : {\n"
+                + "          \"name\":\"directed_by\",\n"
+                + "          \"type\":\"text_general\",\n"
+                + "          \"multiValued\":true,\n"
+                + "          \"stored\":true\n"
+                + "        },\n"
+                + "        \"add-field\" : {\n"
                 + "          \"name\":\"initial_release_date\",\n"
                 + "          \"type\":\"pdate\",\n"
                 + "          \"stored\":true\n"
@@ -386,6 +429,18 @@ public class RunExampleTool extends ToolBase {
                 + "          \"type\":\"knn_vector_10\",\n"
                 + "          \"indexed\":true\n"
                 + "          \"stored\":true\n"
+                + "        },\n"
+                + "        \"add-copy-field\" : {\n"
+                + "          \"source\":\"genre\",\n"
+                + "          \"dest\":\"_text_\"\n"
+                + "        },\n"
+                + "        \"add-copy-field\" : {\n"
+                + "          \"source\":\"name\",\n"
+                + "          \"dest\":\"_text_\"\n"
+                + "        },\n"
+                + "        \"add-copy-field\" : {\n"
+                + "          \"source\":\"directed_by\",\n"
+                + "          \"dest\":\"_text_\"\n"
                 + "        }\n"
                 + "      }");
 
@@ -452,8 +507,6 @@ public class RunExampleTool extends ToolBase {
       // Override the old default port numbers if user has started the example 
overriding SOLR_PORT
       cloudPorts = new int[] {defaultPort, defaultPort + 1, defaultPort + 2, 
defaultPort + 3};
     }
-    File cloudDir = new File(exampleDir, "cloud");
-    if (!cloudDir.isDirectory()) cloudDir.mkdir();
 
     echo("\nWelcome to the SolrCloud example!\n");
 
@@ -499,9 +552,9 @@ public class RunExampleTool extends ToolBase {
     }
 
     // setup a unique solr.solr.home directory for each node
-    File node1Dir = setupExampleDir(serverDir, cloudDir, "node1");
+    File node1Dir = setupExampleDir(serverDir, solrHomeDir, "node1");
     for (int n = 2; n <= numNodes; n++) {
-      File nodeNDir = new File(cloudDir, "node" + n);
+      File nodeNDir = new File(solrHomeDir, "node" + n);
       if (!nodeNDir.isDirectory()) {
         echo("Cloning " + node1Dir.getAbsolutePath() + " into\n   " + 
nodeNDir.getAbsolutePath());
         FileUtils.copyDirectory(node1Dir, nodeNDir);
@@ -532,7 +585,12 @@ public class RunExampleTool extends ToolBase {
       // start the other nodes
       for (int n = 1; n < numNodes; n++)
         startSolr(
-            new File(cloudDir, "node" + (n + 1) + "/solr"), true, cli, 
cloudPorts[n], zkHost, 30);
+            new File(solrHomeDir, "node" + (n + 1) + "/solr"),
+            true,
+            cli,
+            cloudPorts[n],
+            zkHost,
+            30);
     }
 
     String solrUrl = SolrCLI.normalizeSolrUrl((String) 
nodeStatus.get("baseUrl"), false);
@@ -896,7 +954,7 @@ public class RunExampleTool extends ToolBase {
     return nodeStatus;
   }
 
-  protected File setupExampleDir(File serverDir, File exampleParentDir, String 
dirName)
+  protected File setupExampleDir(File serverDir, File solrHomeParentDir, 
String dirName)
       throws IOException {
     File solrXml = new File(serverDir, "solr/solr.xml");
     if (!solrXml.isFile())
@@ -908,7 +966,7 @@ public class RunExampleTool extends ToolBase {
       throw new IllegalArgumentException(
           "Value of --server-dir option is invalid! " + 
zooCfg.getAbsolutePath() + " not found!");
 
-    File solrHomeDir = new File(exampleParentDir, dirName + "/solr");
+    File solrHomeDir = new File(solrHomeParentDir, dirName + "/solr");
     if (!solrHomeDir.isDirectory()) {
       echo("Creating Solr home directory " + solrHomeDir);
       solrHomeDir.mkdirs();
diff --git a/solr/core/src/test/org/apache/solr/cli/TestSolrCLIRunExample.java 
b/solr/core/src/test/org/apache/solr/cli/TestSolrCLIRunExample.java
index f17901b8275..004ac834fd0 100644
--- a/solr/core/src/test/org/apache/solr/cli/TestSolrCLIRunExample.java
+++ b/solr/core/src/test/org/apache/solr/cli/TestSolrCLIRunExample.java
@@ -39,7 +39,6 @@ import java.util.Optional;
 import org.apache.commons.exec.CommandLine;
 import org.apache.commons.exec.DefaultExecutor;
 import org.apache.commons.exec.ExecuteResultHandler;
-import org.apache.lucene.tests.util.LuceneTestCase;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrQuery;
@@ -318,19 +317,16 @@ public class TestSolrCLIRunExample extends SolrTestCaseJ4 
{
   }
 
   @Test
-  @LuceneTestCase.Nightly
   public void testTechproductsExample() throws Exception {
     testExample("techproducts");
   }
 
   @Test
-  @LuceneTestCase.Nightly
   public void testSchemalessExample() throws Exception {
     testExample("schemaless");
   }
 
   @Test
-  @LuceneTestCase.Nightly
   public void testFilmsExample() throws Exception {
     testExample("films");
   }
@@ -357,7 +353,7 @@ public class TestSolrCLIRunExample extends SolrTestCaseJ4 {
           new String[] {
             "-e", exampleName,
             "--server-dir", solrServerDir.getAbsolutePath(),
-            "--example-dir", solrExampleDir.getAbsolutePath(),
+            "--solr-home-dir", solrExampleDir.getAbsolutePath(),
             "-p", String.valueOf(bindPort)
           };
 
@@ -413,13 +409,13 @@ public class TestSolrCLIRunExample extends SolrTestCaseJ4 
{
             numFound = solrClient.query(query).getResults().getNumFound();
           }
           assertEquals(
-              "expected 32 docs in the "
+              "expected 31 docs in the "
                   + exampleName
                   + " example but found "
                   + numFound
                   + ", output: "
                   + toolOutput,
-              32,
+              31,
               numFound);
         }
       }
diff --git a/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java 
b/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java
index 1386737a712..107183001c4 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java
@@ -128,7 +128,7 @@ public class SolrCloudExampleTest extends 
AbstractFullDistribZkTestBase {
     CommandLine postCli = SolrCLI.processCommandLineArgs(postTool, 
argsForPost);
     postTool.runTool(postCli);
 
-    int expectedXmlDocCount = 32;
+    int expectedXmlDocCount = 31;
 
     int numFound = 0;
 
diff --git 
a/solr/core/src/test/org/apache/solr/handler/designer/TestSchemaDesignerAPI.java
 
b/solr/core/src/test/org/apache/solr/handler/designer/TestSchemaDesignerAPI.java
index e306fab5b6c..6d71c978fbc 100644
--- 
a/solr/core/src/test/org/apache/solr/handler/designer/TestSchemaDesignerAPI.java
+++ 
b/solr/core/src/test/org/apache/solr/handler/designer/TestSchemaDesignerAPI.java
@@ -239,7 +239,7 @@ public class TestSchemaDesignerAPI extends 
SolrCloudTestCase implements SchemaDe
     schemaDesignerAPI.query(req, rsp);
     assertNotNull(rsp.getResponseHeader());
     SolrDocumentList results = (SolrDocumentList) rsp.getResponse();
-    assertEquals(48, results.getNumFound());
+    assertEquals(47, results.getNumFound());
 
     // publish schema to a config set that can be used by real collections
     reqParams.clear();
diff --git 
a/solr/core/src/test/org/apache/solr/schema/TestUseDocValuesAsStored.java 
b/solr/core/src/test/org/apache/solr/schema/TestUseDocValuesAsStored.java
index 51cab8a55a7..b6b2e98eab8 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestUseDocValuesAsStored.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestUseDocValuesAsStored.java
@@ -323,7 +323,7 @@ public class TestUseDocValuesAsStored extends 
AbstractBadConfigTestBase {
     assertU(commit());
 
     assertJQ(
-        req("q", "id:myid*", "fl", "*"),
+        req("q", "id:myid*", "fl", "*", "sort", "id asc"),
         "/response/docs==["
             + "{'id':'myid1','test_is_dvo':[101,102,103]},"
             + "{'id':'myid2','test_is_dvo':[201,202]},"
diff --git a/solr/example/exampledocs/test_utf8.sh 
b/solr/example/exampledocs/test_utf8.sh
deleted file mode 100755
index 9032e12ffe3..00000000000
--- a/solr/example/exampledocs/test_utf8.sh
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/sh
-# 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.
-
-#Test script to tell if the server is accepting UTF-8
-#The python writer currently escapes non-ascii chars, so it's good for testing
-
-SOLR_URL=http://localhost:8983/solr
-
-if [ ! -z $1 ]; then
-  SOLR_URL=$1
-fi
-
-curl "$SOLR_URL/select?q=hello&params=explicit&wt=python" 2> /dev/null | grep 
'hello' > /dev/null 2>&1
-if [ $? = 0 ]; then
-  echo "Solr server is up."
-else
-  echo "ERROR: Could not curl to Solr - is curl installed? Is Solr not 
running?"
-  exit 1
-fi
-
-curl "$SOLR_URL/select?q=h%C3%A9llo&echoParams=explicit&wt=python" 2> 
/dev/null | grep 'h\\u00e9llo' > /dev/null 2>&1
-if [ $? = 0 ]; then
-  echo "HTTP GET is accepting UTF-8"
-else
-  echo "ERROR: HTTP GET is not accepting UTF-8"
-fi
-
-curl $SOLR_URL/select --data-binary 
'q=h%C3%A9llo&echoParams=explicit&wt=python' -H 
'Content-type:application/x-www-form-urlencoded; charset=UTF-8' 2> /dev/null | 
grep 'h\\u00e9llo' > /dev/null 2>&1
-if [ $? = 0 ]; then
-  echo "HTTP POST is accepting UTF-8"
-else
-  echo "ERROR: HTTP POST is not accepting UTF-8"
-fi
-
-curl $SOLR_URL/select --data-binary 
'q=h%C3%A9llo&echoParams=explicit&wt=python' 2> /dev/null | grep 'h\\u00e9llo' 
> /dev/null 2>&1
-if [ $? = 0 ]; then
-  echo "HTTP POST defaults to UTF-8"
-else
-  echo "HTTP POST does not default to UTF-8"
-fi
-
-
-#A unicode character outside of the BMP (a circle with an x inside)
-CHAR="𐌈"
-CODEPOINT='0x10308'
-#URL encoded UTF8 of the codepoint
-UTF8_Q='%F0%90%8C%88'
-#expected return of the python writer (currently uses UTF-16 surrogates)
-EXPECTED='\\ud800\\udf08'
-
-curl "$SOLR_URL/select?q=$UTF8_Q&echoParams=explicit&wt=python" 2> /dev/null | 
grep $EXPECTED > /dev/null 2>&1
-if [ $? = 0 ]; then
-  echo "HTTP GET is accepting UTF-8 beyond the basic multilingual plane"
-else
-  echo "ERROR: HTTP GET is not accepting UTF-8 beyond the basic multilingual 
plane"
-fi
-
-curl $SOLR_URL/select --data-binary "q=$UTF8_Q&echoParams=explicit&wt=python"  
-H 'Content-type:application/x-www-form-urlencoded; charset=UTF-8' 2> /dev/null 
| grep $EXPECTED > /dev/null 2>&1
-if [ $? = 0 ]; then
-  echo "HTTP POST is accepting UTF-8 beyond the basic multilingual plane"
-else
-  echo "ERROR: HTTP POST is not accepting UTF-8 beyond the basic multilingual 
plane"
-fi
-
-curl "$SOLR_URL/select?q=$UTF8_Q&echoParams=explicit&wt=python" --data-binary 
'' 2> /dev/null | grep $EXPECTED > /dev/null 2>&1
-if [ $? = 0 ]; then
-  echo "HTTP POST + URL params is accepting UTF-8 beyond the basic 
multilingual plane"
-else
-  echo "ERROR: HTTP POST + URL params is not accepting UTF-8 beyond the basic 
multilingual plane"
-fi
-
-#curl "$SOLR_URL/select?q=$UTF8_Q&echoParams=explicit" 2> /dev/null | od -tx1 
-w1000 | sed 's/ //g' | grep 'f4808198' > /dev/null 2>&1
-curl "$SOLR_URL/select?q=$UTF8_Q&echoParams=explicit" 2> /dev/null | grep 
"$CHAR" > /dev/null 2>&1
-if [ $? = 0 ]; then
-  echo "Response correctly returns UTF-8 beyond the basic multilingual plane"
-else
-  echo "ERROR: Response can't return UTF-8 beyond the basic multilingual plane"
-fi
-
-
diff --git a/solr/example/exampledocs/utf8-example.xml 
b/solr/example/exampledocs/utf8-example.xml
deleted file mode 100644
index e785b38199b..00000000000
--- a/solr/example/exampledocs/utf8-example.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-
-<!-- 
-  After posting this to Solr with bin/solr post, searching for "êâîôû" from
-  the solr/admin/ search page must return this document.
- -->
-
-<add>
-  <doc>
-    <field name="id">UTF8TEST</field>
-    <field name="name">Test with some UTF-8 encoded characters</field>
-    <field name="manu">Apache Software Foundation</field>
-    <field name="cat">software</field>
-    <field name="cat">search</field>
-    <field name="features">No accents here</field>
-    <field name="features">This is an e acute: é</field>
-    <field name="features">eaiou with circumflexes: êâîôû</field>
-    <field name="features">eaiou with umlauts: ëäïöü</field>
-    <field name="features">tag with escaped chars: &lt;nicetag/&gt;</field>
-    <field name="features">escaped ampersand: Bonnie &amp; Clyde</field>
-    <field name="features">Outside the BMP:𐌈 codepoint=10308, a circle with an 
x inside. UTF8=f0908c88 UTF16=d800 df08</field>
-    <field name="price">0.0</field>
-    <field name="inStock">true</field>
-  </doc>
-</add>
diff --git a/solr/packaging/test/test_post.bats 
b/solr/packaging/test/test_post.bats
index 891fb3f4be3..9ad2847b2ae 100644
--- a/solr/packaging/test/test_post.bats
+++ b/solr/packaging/test/test_post.bats
@@ -120,8 +120,8 @@ teardown() {
   # We filter to xml,json,and csv as we don't want to invoke the Extract 
handler, and are running it as a dry run
   run solr post --dry-run --filetypes xml,json,csv --solr-update-url 
http://localhost:${SOLR_PORT}/solr/foobar/update --skip-commit 
${SOLR_TIP}/example/exampledocs
 
-  assert_output --partial 'Dry run complete. 16 would have been indexed.'
-  refute_output --partial '16 files indexed.'
+  assert_output --partial 'Dry run complete. 15 would have been indexed.'
+  refute_output --partial '15 files indexed.'
   refute_output --partial 'ERROR'
 }
 
@@ -132,10 +132,10 @@ teardown() {
   # We filter to xml,json,and csv as we don't want to invoke the Extract 
handler.
   run solr post --filetypes xml,json,csv --solr-update-url 
http://localhost:${SOLR_PORT}/solr/mixed_content/update 
${SOLR_TIP}/example/exampledocs
 
-  assert_output --partial '16 files indexed.'
+  assert_output --partial '15 files indexed.'
   refute_output --partial 'ERROR'
   run curl "http://localhost:${SOLR_PORT}/solr/mixed_content/select?q=*:*";
-  assert_output --partial '"numFound":46'
+  assert_output --partial '"numFound":45'
 }
 
 # this test doesn't complete due to issues in posting to the /extract handler
diff --git 
a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-techproducts.adoc 
b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-techproducts.adoc
index ef9fab4d0cc..c26987dc2b5 100644
--- 
a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-techproducts.adoc
+++ 
b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-techproducts.adoc
@@ -195,8 +195,6 @@ POSTing file sample.html (text/html) to [base]/extract
 POSTing file sd500.xml (application/xml) to [base]
 POSTing file solr-word.pdf (application/pdf) to [base]/extract
 POSTing file solr.xml (application/xml) to [base]
-POSTing file test_utf8.sh (application/octet-stream) to [base]/extract
-POSTing file utf8-example.xml (application/xml) to [base]
 POSTing file vidcard.xml (application/xml) to [base]
 20 files indexed.
 COMMITting Solr index changes to 
http://localhost:8983/solr/techproducts/update...

Reply via email to