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

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


The following commit(s) were added to refs/heads/main by this push:
     new fe517d14b72 SOLR-17683: Update test to reflect only one type of 
Currency Field in Solr. (#3306)
fe517d14b72 is described below

commit fe517d14b725b4d49212a6720bfc1bf2612cb9e7
Author: Eric Pugh <[email protected]>
AuthorDate: Thu Apr 3 16:37:48 2025 +0200

    SOLR-17683: Update test to reflect only one type of Currency Field in Solr. 
(#3306)
---
 solr/core/src/test-files/solr/collection1/conf/schema.xml    | 12 ++++++------
 .../test/org/apache/solr/schema/CurrencyFieldTypeTest.java   |  7 +++----
 .../org/apache/solr/search/CurrencyRangeFacetCloudTest.java  |  5 ++---
 .../src/test-files/solr/collection1/conf/schema.xml          | 12 ++++++------
 4 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/solr/core/src/test-files/solr/collection1/conf/schema.xml 
b/solr/core/src/test-files/solr/collection1/conf/schema.xml
index b824c77460f..49470766818 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema.xml
@@ -437,11 +437,11 @@
   <fieldType name="xyd" class="solr.PointType" dimension="2" 
subFieldSuffix="_d1"/>
 
   <!-- Currency type --> 
-  <fieldType name="currency_CFT" class="solr.CurrencyFieldType" 
amountLongSuffix="_l1_ns" codeStrSuffix="_s1"
+  <fieldType name="currency" class="solr.CurrencyFieldType" 
amountLongSuffix="_l1_ns" codeStrSuffix="_s1"
              currencyConfig="currency.xml" multiValued="false"/>
-  <fieldType name="mock_currency_CFT" class="solr.CurrencyFieldType" 
amountLongSuffix="_l1_ns" codeStrSuffix="_s1"
+  <fieldType name="mock_currency" class="solr.CurrencyFieldType" 
amountLongSuffix="_l1_ns" codeStrSuffix="_s1"
              providerClass="solr.MockExchangeRateProvider" foo="bar" 
multiValued="false"/>
-  <fieldType name="oer_currency_CFT"
+  <fieldType name="oer_currency"
              class="solr.CurrencyFieldType"
              amountLongSuffix="_l1_ns"
              codeStrSuffix="_s1_ns"
@@ -567,9 +567,9 @@
   <field name="work" type="xy" indexed="true" stored="true" 
multiValued="false"/>
 
   <!-- Test currency -->
-  <field name="amount_CFT" type="currency_CFT" indexed="true" stored="true" 
multiValued="false"/>
-  <field name="mock_amount_CFT" type="mock_currency_CFT" indexed="true" 
stored="true"/>
-  <field name="oer_amount_CFT" type="oer_currency_CFT" indexed="true" 
stored="true"/>
+  <field name="amount" type="currency" indexed="true" stored="true" 
multiValued="false"/>
+  <field name="mock_amount" type="mock_currency" indexed="true" stored="true"/>
+  <field name="oer_amount" type="oer_currency" indexed="true" stored="true"/>
 
   <!-- test different combinations of indexed and stored -->
   <field name="bind" type="boolean" indexed="true" stored="false" 
docValues="false"/>
diff --git 
a/solr/core/src/test/org/apache/solr/schema/CurrencyFieldTypeTest.java 
b/solr/core/src/test/org/apache/solr/schema/CurrencyFieldTypeTest.java
index e6de7a7efd5..2bc21777d19 100644
--- a/solr/core/src/test/org/apache/solr/schema/CurrencyFieldTypeTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/CurrencyFieldTypeTest.java
@@ -45,14 +45,13 @@ public class CurrencyFieldTypeTest extends SolrTestCaseJ4 {
     this.expectedProviderClass = expectedProviderClass;
   }
 
-  // remove cft later
   @ParametersFactory
   public static Iterable<Object[]> parameters() {
     return Arrays.asList(
         new Object[][] {
-          {"amount_CFT", FileExchangeRateProvider.class}, // CurrencyFieldType
-          {"mock_amount_CFT", MockExchangeRateProvider.class}, // 
CurrencyFieldType
-          {"oer_amount_CFT", OpenExchangeRatesOrgProvider.class} // 
CurrencyFieldType
+          {"amount", FileExchangeRateProvider.class}, // CurrencyFieldType
+          {"mock_amount", MockExchangeRateProvider.class}, // CurrencyFieldType
+          {"oer_amount", OpenExchangeRatesOrgProvider.class} // 
CurrencyFieldType
         });
   }
 
diff --git 
a/solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java 
b/solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java
index 1c0e0fa4969..73f1a81ae86 100644
--- a/solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java
+++ b/solr/core/src/test/org/apache/solr/search/CurrencyRangeFacetCloudTest.java
@@ -39,7 +39,7 @@ public class CurrencyRangeFacetCloudTest extends 
SolrCloudTestCase {
   private static final String COLLECTION = 
MethodHandles.lookup().lookupClass().getName();
   private static final String CONF = COLLECTION + "_configSet";
 
-  private static String FIELD = null; // randomized
+  private static String FIELD = "amount";
 
   private static final List<String> STR_VALS = Arrays.asList("x0", "x1", "x2");
   // NOTE: in our test conversions EUR uses an asymmetric exchange rate
@@ -56,7 +56,6 @@ public class CurrencyRangeFacetCloudTest extends 
SolrCloudTestCase {
   @BeforeClass
   public static void setupCluster() throws Exception {
     CurrencyFieldTypeTest.assumeCurrencySupport("USD", "EUR", "MXN", "GBP", 
"JPY", "NOK");
-    FIELD = usually() ? "amount_CFT" : "amount";
 
     final int numShards = TestUtil.nextInt(random(), 1, 5);
     final int numReplicas = 1;
@@ -76,7 +75,7 @@ public class CurrencyRangeFacetCloudTest extends 
SolrCloudTestCase {
 
     // we're indexing each Currency value in 3 docs, each with a diff 'x_s' 
field value
     // use modulo to pick the values, so we don't add the docs in strict order 
of either VALUES of
-    // STR_VALS (that way if we want ot filter by id later, it's an 
independent variable)
+    // STR_VALS (that way if we want to filter by id later, it's an 
independent variable)
     for (int id = 0; id < NUM_DOCS; id++) {
       final String x = STR_VALS.get(id % STR_VALS.size());
       final String val = VALUES.get(id % VALUES.size());
diff --git 
a/solr/test-framework/src/test-files/solr/collection1/conf/schema.xml 
b/solr/test-framework/src/test-files/solr/collection1/conf/schema.xml
index 2b9ae1f053d..7728826d311 100644
--- a/solr/test-framework/src/test-files/solr/collection1/conf/schema.xml
+++ b/solr/test-framework/src/test-files/solr/collection1/conf/schema.xml
@@ -437,11 +437,11 @@
   <fieldType name="xyd" class="solr.PointType" dimension="2" 
subFieldSuffix="_d1"/>
 
   <!-- Currency type -->
-  <fieldType name="currency_CFT" class="solr.CurrencyFieldType" 
amountLongSuffix="_l1_ns" codeStrSuffix="_s1"
+  <fieldType name="currency" class="solr.CurrencyFieldType" 
amountLongSuffix="_l1_ns" codeStrSuffix="_s1"
              currencyConfig="currency.xml" multiValued="false"/>
-  <fieldType name="mock_currency_CFT" class="solr.CurrencyFieldType" 
amountLongSuffix="_l1_ns" codeStrSuffix="_s1"
+  <fieldType name="mock_currency" class="solr.CurrencyFieldType" 
amountLongSuffix="_l1_ns" codeStrSuffix="_s1"
              providerClass="solr.MockExchangeRateProvider" foo="bar" 
multiValued="false"/>
-  <fieldType name="oer_currency_CFT"
+  <fieldType name="oer_currency"
              class="solr.CurrencyFieldType"
              amountLongSuffix="_l1_ns"
              codeStrSuffix="_s1_ns"
@@ -570,9 +570,9 @@
   <field name="amount" type="currency" indexed="true" stored="true" 
multiValued="false"/>
   <field name="mock_amount" type="mock_currency" indexed="true" stored="true"/>
   <field name="oer_amount" type="oer_currency" indexed="true" stored="true"/>
-  <field name="amount_CFT" type="currency_CFT" indexed="true" stored="true" 
multiValued="false"/>
-  <field name="mock_amount_CFT" type="mock_currency_CFT" indexed="true" 
stored="true"/>
-  <field name="oer_amount_CFT" type="oer_currency_CFT" indexed="true" 
stored="true"/>
+  <field name="amount" type="currency" indexed="true" stored="true" 
multiValued="false"/>
+  <field name="mock_amount" type="mock_currency" indexed="true" stored="true"/>
+  <field name="oer_amount" type="oer_currency" indexed="true" stored="true"/>
 
   <!-- test different combinations of indexed and stored -->
   <field name="bind" type="boolean" indexed="true" stored="false"/>

Reply via email to